Something could go wrong with the following code. Identify and fix the problem. Scanner keyboard = new Scanner(System.in); System.out.println("Enter your age."); int age = keyboard.nextInt();...



Something could go wrong with the following code. Identify and fix the


problem.


Scanner keyboard = new Scanner(System.in);


System.out.println("Enter your age.");


int age = keyboard.nextInt();


System.out.println("Enter your name.");


String name = keyboard.nextLine();


System.out.println(name + ",you are " + age + " years old.");



May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here