|
System.in.read() method reads the next byte of data from inputstream. The Value byte is returned as an int in the range 0 to 255. If no byte is available the value -1 is returned.
But in the code fragment int a=3; we are assinging integer value to position allocated for integer variable a. So it creates no problem.
hope is usefull,
thank you
|