Java Scanner/String

Hi people, I have some Java code for a basic calculator (+ - * / (I'm new at this)) and I have a Scanner variable that asks which you would like. How
do make the Scanner accept String input?

Comments

  • [code]Scanner input = new Scanner (System.in);
    String (any name is fine) = input.next();[/code]
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion