In one commend , I'm trying to send data to System.out like this:
And in another command I'm trying to get this data from System.in.
It's strange because, it works once of many tries. I can try to run it 10 times and it's still inReader.ready() == false, and when I run it for example 11th time , it works.
Why ? How can I fix this? How to make it work everytime ?
Thanks, in advance !
Returns: True if the next read() is guaranteed not to block for input, false otherwise. Note that returning false does not guarantee that the next read will block.So it is useless to check - just call read to read the data and the data will go into the program as the program earlier in the chain output something