I have made a scanner object and am trying to use
Code:
Scanner so = new Scanner(System.in);
while (so.nextLine() !=null){
... do stuff
}
Code:
BufferedReader myIn = new BufferedReader(new InputStreamReader(System.in));
String word;
while(true){
word= myIn.readLine();
if(word==null)
break;
}
What should I do? I want it to be short and well "correct", so it is safe(no continious loop or crashes).
Thanks in advance!
