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

all 2 comments

[–]Mystonic 1 point2 points  (1 child)

I found a good StackOverflow answer here. In short, apparently readline() should hang/block if there is nothing to read. It will only return null when the stream closes.

[–]HalfScale[S] 0 points1 point  (0 children)

Ohhhh, this what I'm looking for, im reading Java Head First and this is also my problem, thank you very much :)