Scanner sc = new Scanner(System.in);
System.out.println("Enter a value");
int num1 = sc.nextInt();
String name = sc.nextLine();
System.out.println(name);
System.out.println(num1);
Scanner sc = new Scanner(System.in);
System.out.println("Enter a value");
int num1 = sc.nextInt();
String name = sc.nextLine();
System.out.println(name);
System.out.println(num1);
0 Comments