How can I use the stored data? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How can I use the stored data?

mport java.util.Scanner; class MyClass { public static void main(String[ ] args) { Scanner myVar = new Scanner(System.in); System.out.println(myVar.nextLine()); } }

12th Sep 2017, 12:28 PM
Mr. Pool
Mr. Pool - avatar
2 Answers
+ 5
Using a variable. String input = myVar.nextLine(); System.out.println(input); // now you can still use the input for other things
12th Sep 2017, 2:39 PM
Rrestoring faith
Rrestoring faith - avatar
0
Thanks
12th Sep 2017, 2:45 PM
Mr. Pool
Mr. Pool - avatar