- 1

public class main { public static void main(String[] args) { Scanner scan = new Scanner(System.in) ; System.ou

public class main { public static void main(String[] args) { Scanner scan = new Scanner(System.in) ; System.out.println("enter your name"); String input = scan. nextline(); System.out.println(input); } } What's wrong with my code??

13th Jun 2021, 9:38 PM
Musaif
2 Réponses
+ 9
import java.util.Scanner; public class main { public static void main(String[] args) { Scanner scan = new Scanner(System.in) ; System.out.println("enter your name"); String input = scan. nextLine(); System.out.println(input); } }
14th Jun 2021, 12:24 AM
Simba
Simba - avatar
+ 1
Thanks you soo much
14th Jun 2021, 2:58 AM
Musaif