everytime I keyed in Y at the end of the do-while loop, it will not let me key-in for the "Enter name for appointment" I tried changing c = input.next(); to c = input.nextLine(); but is still didnt work. WHy? please help
import java.util.Scanner;
import APP.*;
public class AppointmentTest
{
public static void main(String[] args)
{
Appointment app = new Appointment();
String m, y;
double st, et;
//char c;
String c;
Scanner input = new Scanner (System.in);
do
{
System.out.print("Enter name for the appointment :");
m = input.nextLine();
app.setName(m);
System.out.print("Enter day appointment :");
y = input.nextLine();
app.setDay(y);
System.out.print("Enter start time :");
st = input.nextDouble();
app.setStartTime(st);
System.out.print("Enter end time :");
et = input.nextDouble();
app.setEndTime(et);
System.out.println("Duration of appointment :");
System.out.print("Do you have any other appointment? (Y/N) :");
//c = input.next().charAt(0);
c = input.next();
}while (c != "N" && c != "n");
}
}