Hacker News new | ask | show | jobs
by abhiyerra 272 days ago
I learned to read line as the following in Java 1.2 so the Scanner class is new to me. :p

  BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
  String input = in.readLine();
1 comments

Yep, same for me, it's been a long time since I did java and while the publicstaticvoidmain mantra felt familiar I was a bit confused by the Scanner thing and couldn't say why.
Same here, oddly pleased that the Scanner class is deprecated before I even knew about it.