+ 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
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);
}
+ 1
zemiak this for String i need for integer
+ 1
BufferReader has no direct method to read integer. You need to cast in.
int num = Integer.parseInt( in.readLine() ) ;
Hope it helps..