News for hackers. Stuff that matters.
Re:Why I like Java by chatman on Tuesday March 25, 2014 @03:20AM (#7464379)
public static void main(String[]args) throws IOException {

  Scanner sc = new Scanner(System.in);

  String line;

  while((line=sc.readLine())!=null)

     System.out.println(line);
}

What's so verbose about it?

Re:Why I like Java by cbsmith on Tuesday March 25, 2014 @10:43AM (#7466126)
So, that actually is going to have problems with binary data in the file. However, you are correct it doesn't need to be terribly verbose (not as efficient as it could be, but that is easily fixable): https://gist.github.com/cbsmith/9755809

It's amazing though how often the solutions posted are just wrong.

Re:Why I like Java by jsight on Tuesday March 25, 2014 @10:42AM (#7466118)
You didn't import Scanner, and java.util.Scanner (what I assume you are using) does not have a readLine method. :)