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 andon 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 inthread “main” java.util.InputMismatchException”, can you fix thisissue like create file a1.dat and the code
Expert Answer
An answer will be send to you shortly. . . . .