Question: These are the errors I keep getting when trying to run my code. Not sure what I am doing wrong. LAB ACTIVITY 1.17.1: Variables, input,

 These are the errors I keep getting when trying to run

These are the errors I keep getting when trying to run my code. Not sure what I am doing wrong.

LAB ACTIVITY 1.17.1: Variables, input, and casting (Java) 0/5 BasicInput.java Load default template... char userChar; String userString; System.out.print("Enter Double: "); userDouble-scnr.nextDouble(); System.out.print("Enter Character: "); userChar=scnr.next().charAt(0); System.out.print("Enter String: "); userString=scnr.next(); 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 char userChar; String userString: System.out.println(userInt+" "+userDouble+" "+userChar+" "+userString); System.out.println(userString+" "+userChar+" "+userDouble+" "+user Int); System.out.println(userDouble+" cast to integer "+(int)user Double); scnr.close(); return; Develop mode Submit mode Run your program as often as you'd like, before submitting for grading. Below, type any needed input values in the first box, then click Run program and observe the program's output in the second box Enter program input (optional) If your code requires input values, provide them here. Your program expects input Run program Input (from above) - BasicInput.java (Your program) Output (shown below) Program errors displayed here Exception in thread "main" java.util.NoSuchElementException at java.base/java.util.Scanner. throwFor (Scanner.java:937) at java.base/java.util.Scanner.next (Scanner.java:1594) at java.base/java.util.Scanner.nextInt (Scanner.java:2258) at java.base/java.util.Scanner.nextInt (Scanner.java:2212) at BasicInput.main (BasicInput.java:11)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!