my codes occur some problem inside.whn i answered 'N' to the last question(DO YOU WISH TO CONTINUE?(Y/N)), the program will repeat run again, but i cnt enter student name!anyone can help me solve the problem>?
import java.util.Scanner;
public class homewok{
public static void main(String args[]){
Scanner xx = new Scanner(System.in);
boolean vv = true;
do{
System.out.println("----------------------------------------------");
System.out.println("WELCOME TO BOOKING SYSTEM");
System.out.println("----------------------------------------------");
System.out.println("\n---PLEASE ENTER YOUR PERSONAL INFORMATION---");
System.out.print("\nPLEASE ENTER STUDENT NAME : ");
String name = xx.nextLine();
boolean ag = true;
do{
System.out.print("\nPLEASE ENTER STUDENT ID NUMBER(eg : 1xxxxx) : TP ");
int TP = xx.nextInt();
if (TP < 100000){
System.out.println("LOGIN FAIL!PLEASE ENTER AGAIN.");
ag = true;}
else if (TP> 999999){
System.out.println("LOGIN FAIL!PLEASE ENTER AGAIN.");
ag = true;}
else if ((TP>=100000) && (TP<=999999)){
System.out.println("LOGIN SUCCESSFUL!\nPLEASE CONTINUE TO FILL IN YOUR PERSONAL INFORMATION.");
ag = false;}
}while (ag == true);
System.out.print("\nPLEASE ENTER YOUR SEX(M/F) : ");
char s = xx.next().charAt(0);
if (s=='m')
System.out.println("WELCOME TO BOOKING SYSTEM, MR. "+(name));
else if (s=='f')
System.out.println("WELCOME TO BOOKING SYSTEM, MISS "+(name));
System.out.print("DO YOU WISH TO CONTINUE?(Y/N) : ");
char oo = xx.next().charAt(0);
if (oo == 'y'){
System.out.println("PLEASE CONTINUE.");
vv = true;}
else if (oo == 'n'){
System.out.println("PLEASE ENTER YOUR PERSONAL INFORMATION AGAIN.");
vv = false;}
}while(vv == false);
}
}