+ 1

Send operation to server ?

Hi everyone i need help when declarate a var with inpustream will display error so i need explain or cours in this : inputstream,inputstreamReader,BufferedReader

17th Mar 2022, 9:56 PM
Izmiir
Izmiir - avatar
3 Answers
+ 2
it is easier if you attach your code import java.net.*; import java.io.*; try ( BufferedReader in = new BufferedReader( new InputStreamReader( socket.getInputStream() )); ){ } catch (IOException ex) { System.out.println(ex); }
18th Mar 2022, 12:39 AM
zemiak
+ 1
zemiak this for String i need for integer
18th Mar 2022, 7:49 AM
Izmiir
Izmiir - avatar
+ 1
BufferReader has no direct method to read integer. You need to cast in. int num = Integer.parseInt( in.readLine() ) ; Hope it helps..
18th Mar 2022, 9:50 AM
Jayakrishna 🇼🇳