News for hackers. Stuff that matters.
Re:Why I like Java by cbsmith on Tuesday March 25, 2014 @09:55AM (#7465825)
You need a test for the exit condition (read returning back -1) and you need to flush stdout.
Re:Why I like Java by jbooth on Tuesday March 25, 2014 @10:12AM (#7465942)
Right, thanks. Either way, it's not rocket surgery.
Re:Why I like Java by cbsmith on Tuesday March 25, 2014 @10:39AM (#7466099)
Agreed. Then again, you did mess it up the first time, so I guess it is an effective test. Everyone uses the buffer, which I find amusing.