Please tell me how to get input from the user in the single line like c we will use scanf,in c++ we will use cin. If not so, what is the use System.in.read.
posted 15 years ago
Construct some other convinent Reader from System.in For example if I want to read data line by line BufferedReader bin=new BufferedReader(new InputStreamReader(System.in)) Now I can call String dataRead=bin.readLine(); If you want to read integers, floats then use DataInputStream. Is it not comfortable to you??? I feel it is very very comfortable than C or C++. For any doubts, I'm ready to clear. -SaTyA-