+ 2

Please help me for correct these program

https://code.sololearn.com/cQKD88IPXq89/?ref=app

19th Jul 2017, 12:10 PM
Samrat Tayade
Samrat Tayade - avatar
3 Answers
+ 3
System.out.println("enter name"); Scanner sc = new Scanner(System.in); String name=sc.nextLine(); System.out.println("no is: " + name); after you make a new scanner, you have to use it. Line 2 I made a new scanner. Line 3 I used it to assign the input to a variable called name.. then in line 4 I put it into the print method
19th Jul 2017, 12:22 PM
LordHill
LordHill - avatar
+ 3
thank you very much.
19th Jul 2017, 1:33 PM
Samrat Tayade
Samrat Tayade - avatar
+ 2
likes my programs if {correct}
19th Jul 2017, 1:35 PM
Samrat Tayade
Samrat Tayade - avatar