0
Make this code work
Scanner a= new Scanner( system.in); String name= a.nextLine();
13 Answers
+ 12
It's giving no output just because you haven't yet tried to print the String variable 'name'. Put this at the end of your code :
System.out.println(name);
This is the funniest mistake ever xD
+ 2
s of System.in should be capital
+ 2
what type of error it is showing?
+ 2
try this
String name=a.next()+a.nextLine();
+ 2
can you please post your code
0
it's not working even then try it
0
it's giving no output on entering String as input
0
it's giving no output again
0
yes!
0
thanks i
0
@Vikas Patel! Hello! Vikas constructors can not be inherited!!!