Answered step by step
Verified Expert Solution
Question
1 Approved Answer
java question Scanner input = new Scanner(a1.dat); int mission = input.nextInt(); boolean onMission = input.nextBoolean(); String name = input.nextLine(); System.out.println(name + has done +
java question
Scanner input = new Scanner(a1.dat);
int mission = input.nextInt();
boolean onMission = input.nextBoolean();
String name = input.nextLine();
System.out.println(name + "has done " + mission + " missions and on Mission states is " + onMission);
a1.dat file contain:
B
false
Crew 41
what is the output? And when i run it i get error "Exception in thread "main" java.util.InputMismatchException", can you fix this issue like create file a1.dat and the code
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started