+ 3
Guys please help me out!...The code has all the description
Still learning this thing https://code.sololearn.com/cNhita9pkxw0/?ref=app
2 Answers
+ 10
Your Java program should be inside a main method. The main method acts an entry point of the program. And that main method should be inside a class.
Also for printing, the method is println (with a lowercase L)
Go through your Sololearn Java Course to recollect everything you learnt đ
0
import java.util.Scanner;
public class MyClass {
public static void main(String[ ] args) {
Scanner myVar = new Scanner(System.in);
System.out.println ("what is your name");
System.out.println (myVar.nextLine());
}
}
the output will be as you expected ,try it in sololearn compilation interface.