How can I get a scanner object to get new line characters as well?
The text file is something like:
when I run this code it'll print out:
Hello World!How are you?
The text file is something like:
Code:
Hello world!
How are you?
Code:
while(myScanner.hasNext()){
System.out.println(myScanner.nextLine());
}
when I run this code it'll print out:
Hello World!How are you?