0
System.out.println(myVar.nextLine());
why we used myvar.nextline()here
1 Answer
+ 1
nextLine() reads an input and converts it to String
myVar is the scanner's name - previously it has to be declared as:
Scanner myVar = new Scanner();
Since this function is used as a println's argument, the input gets printed out immediately after it is read.



