I read a string from the user. Then, when I use the string, I see it's being shortened. I don't know how or why? I need the whole String
, not just a part of it!
This is the code:
String exp=null;
System.out.println("Enter an expression without nested parenthesis");
try {
exp=read.next();
System.out.println("exp 1 : " + exp);
}
An example run:
input: 13 + 45
The example output is:
exp 1 : 13