Many situations arise when you have to choose between two options: true/false, male/female etc.
This short snippet will only allow two chars to pass through: capital 'Y' or capital 'N'.
The Read and ReadLine methods can serve also, but have the side effect you have to use Upper and Lower case methods if-statements, or (with ReadLine) testing if only 1 char is input etc.
Notice that the condition in the do - while has to be false.
public class GrossmontBank
//class variables (global - accessible throughout this class)
//scanner object to be used throughout
private static Scanner input = new Scanner(System.in);