I am making a project for characteristics of a vehicle. I have the code to make it run once without any problem. However, after i type Y to do it again it puts the first two questions together in one prompt. How do i fix this?
public static void main(String[] args) {
//break continue
char choice;
Scanner in = new Scanner(System.in);
do{
//vehicle make
System.out.print("Please enter vehicle make ");
String make = in.nextLine();
//vehicle model
System.out.print("Please enter vehicle model ");
String model = in.nextLine();
//vehicle color
System.out.print("Please enter color of vehicle ");
String color = in.nextLine();
//number of doors
System.out.print("Please enter number of doors ");
int door = in.nextInt();
//Print out information
System.out.println("Your vehicle is a " +make + " " +model + ", which is " +color + " with " +door + " doors.");
//Continue prompt
System.out.print("Do you want to continue (Y/N): ");
choice=in.next().charAt(0);
}while((choice!='n')&&(choice!='N'));
} //end main
} //end class