Question: Whenever I run my Java program, it does not let me enter a gender and continues on to the next students full name. My question

Whenever I run my Java program, it does not let me enter a gender and continues on to the next students full name. My question is how do i get the program to allow me to enter the gender. Whenever I run my Java program, it does not let me enter

LO Tools Window Help 127 13 public class Student Test ( 14 15 public static void main(Strinel] args) { 16 12 Scanner in = new Scanner(System.in); 18 19 Student FirstStudent = new Student (://information for first student 20 System.out.println("Please enter the full name of the student: "); 21 firstStudent.setStudent Nane(in.nextLine()); System.out.println("Please enter the age of the student: "); 23 firstStudent.setStudentAge(in.nextInt()); 24 System.out.println("Please enter the gender of the student: "); 25 firstStudent.setStudentGender(in.nextLine()); 26 27 28 Student Second Student = new Student();//info for second student 29 System.out.println("Please enter the full name of the student: "); 30 secondStudent.setStudent Name (in.nextLine()); 31 System.out.println("Please enter the age of the student: "); 32 secondstudent.setStudentAge(in.nextInt(); 51. Stilwel. MyC... Spoo CountCe fel de populi IMG Complesso GRASP Messages un to interactions End Clear - GRASP: process ended by user GRASP exec: Java Student Test Please enter the full name of the student John Brown Please enter the age of the student: 30 Please enter the gender of the student: Please enter the full name of the student Din Kate Please enter the age of the student 21 Please enter the gender of the student: please enter the full name of the student + nch O

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!