+ 3

Guys please help me out!...The code has all the description

Still learning this thing https://code.sololearn.com/cNhita9pkxw0/?ref=app

9th Jun 2020, 10:34 AM
Calvin Capstone
Calvin Capstone - avatar
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 😄
9th Jun 2020, 10:44 AM
Nova
Nova - avatar
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.
9th Jun 2020, 12:50 PM
Mohammed Afzal Hussain
Mohammed Afzal Hussain - avatar