That is completely different code from what you had earlier, with different semantics. It looks as if you were guessing about different kinds of code, and guessing is always a bad idea. Don't create multiple Scanners reading System.in. Use one Scanner for System.in for the whole application and never close it.
Also, go through your loop and work out what happens to the loop variable (noOfElements) during the loop.
If you are trying to create an expression, why are you concatenating the whole thing into one
String? Why don't you have classes for operators and operands and expressions? If you put the whole thing together into a String, you will have the same problem about breaking the String up later.