That sounds a little excessive Sean4u.
A simple program which reads in 1 line, then uses String.charAt(index) to get the first, second and third character from the input String, which you can then...
Type: Posts; User: newbie
That sounds a little excessive Sean4u.
A simple program which reads in 1 line, then uses String.charAt(index) to get the first, second and third character from the input String, which you can then...
Yeah, Scanner is better.
Look up: String.charAt()
And: Integer.parseInt()
Should be enough information there to get you going.
So what is wrong with taking one of the approaches I suggested? If it's not right, why isn't it? What is your program supposed to do?
Can't you just print it all out in the end? I.e System.out.println("Input: " + n1+operator+n2);?
Or request 1 input, everything in 1 go, then extract 1 character at a time from the input?