0
else if(choice == 3){
			
System.out.println("what is your name? ");
			
String name = kb.nextLine(); 
			
boolean x = Member.checkMember(name);
			
System.out.println(x);
		
		
}

when i run this, it prints "what is your name?" and instead of waiting for me type in something, it just skips that part and go ahead and prints x. this code is inside a while loop.

Edited by plasticfood: n/a

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by javaAddict
0

Do you use in your code one of those methods:
kb.nextInt() or kb.next() perhaps?

The solution is very simple, but first let us know if the above is true and what other methods of the scanner class do you use.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.