I want to read several things ( long, string ) from console but I don't know why for, for example just several first input it works and then it doesn't work for others: below is the code what I'm talking about, it doesn't ask for adress
public void getInfo(PhoneBook PB)
{
Scanner keyboard = new Scanner(System.in).useDelimiter("\n");
String c1 = "yes";
do {
System.out.print("Name:");
PB.setName(keyboard.nextLine());
System.out.print("Family:");
PB.setFamily(keyboard.nextLine());
System.out.print("Address:");
PB.setAddress(keyboard.nextLine());
System.out.print("Number:");
PB.setNumber(keyboard.nextLong());
System.out.println("Do you want to continue(yes/no)");
c1 = keyboard.nextLine();
phoneBooks.add(PB);
}while (c1.equals("yes"));
}
Thanks in advance