So here it is, this is my new problem, we were assigned to create a simple ATM Machine:
Automatic Teller Machine
Balance Machine
[D] Deposit
[W] Withdrawal
[Q] Quit
Select you option:
(input letter here)
when i choose balance this window should pop out:
Your Balance is 0.00
OK ( <--that "ok" is in showConfirmDialog)
this is the code that i did but cant figure out what is the error in there!
this program should accept either small or big letter
public static void main(String[] args) {
// TODO Auto-generated method stub
String a =(String)(JOptionPane.showInputDialog(null, "Automatic Teller Machine\n [B] Balance Inquiry\n [D]Deposit\n [W] Withdrawal\n [Q] Quit\n Select you Options: ","Automatic Teller Machine",JOptionPane.PLAIN_MESSAGE));
String b = "";
if(a==b ){
/*if (a.equalsIgnoreCase("B"))*/
JOptionPane.showConfirmDialog(null,"Your Balance is 0.00","Balance Inquiry",JOptionPane.PLAIN_MESSAGE );
}
}
}
thanks for the help!