Blank input from scanner - java?

You need to compare strings with the equals method, not.

You need to compare strings with the . Equals method, not ==.

1 I still get the same thing. When I press enter it just takes me down one line so I can enter something. – Joel Sanchez Apr 16 at 20:42.

The scanner looks for tokens between whitespaces and newlines - but there aren't any. I don't tend to use Scanner for reading from standard input - I use the old-fashioned BufferedReader method like this: BufferedReader buf = new BufferedReader (new InputStreamReader (System. In)); and then I can say String line = buf.

ReadLine (); if (line. Equals ("")) blah(); There may be an easier solution however.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions