This content has been marked as final. Show 3 replies
This short article should clear your misunderstanding: http://tutorials.jenkov.com/java-io/system-in-out-error.html
Your question makes no sense. You are setting System.in and System.out to their existing values and yet expecting a different behaviour. Why?
but it SEEMS like i should be able to write to STDOUT, then have it wait for me until i read from STDIN.
I tried the following code:You however are missing the point that a stream has two ends. The streams you are grabbing do not let you control both ends (within java.)
So you need to create a stream, rather than using an existing one.