scanner.nextLine();
I'm having a problem with this program I made that's just supposed to take a name, address, and phone number and add them to an arraylist. The first time I call the method to take a name, it works perfectly, then moves on to address, phone number, and then prompts me to chose what I want to do with that information. Problem is, if I choose to add more information by calling the TakeName() method, the input is skipped, but the print statement is printed, and the TakeAddress() method is called immediately. The same problem occurs when I try to use the Find() method. It just skips over my input, but still displays the print statements as it should. Here's my code, I would've made an actual project on SoloLearn, but it handles inputs differently than NetBeans does. public void TakeName(){ String name; System.out.print("Enter a name: "); name = input.nextLine(); Names.add(name.trim()); TakeAddress(); } public void TakeAddress(){ String address; System.out.print("Enter an address: "); address = input.nextLine(); Addresses.add(address.trim()); TakePhone(); } public void TakePhone(){ String phone; System.out.print("Enter a phone number: "); phone = input.nextLine(); PhoneNums.add(phone.trim()); System.out.print("Information Added."); Select(); } public void Select(){ int select; System.out.println(); System.out.println("1. Add more information\n2. Find information\n3. Show all\n4. End Program"); select = input.nextInt(); System.out.println(); switch (select){ case 1: TakeName(); break; case 2: Find(); break; case 3: Show(); break; default: System.out.println("Program Ended."); } }