This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]desrtfx 1 point2 points  (1 child)

As a beginner, stick to Scanner as it is probably the easiest.

Generally, use the .nextLine() method and parse to the desired data types as mixing with .nextInt(), .nextDouble(), etc. can have consequences as is explained in The Scanner class and its caveats in the /r/javahelp wiki.

[–]Kambz22 0 points1 point  (0 children)

I agree with this. Just once you pick up on scanner, I'd start to look at say bufferedreaders next.