Expand|Select|Wrap|Line Numbers
- tmpStr = JOptionPane.showInputDialog("Would you like to select your \nown terminal velocity?[Y/n]: ");
- if (user_ans=="" || user_ans=="Y"|| user_ans=="y"){
- user_ans="Y";
- }else{user_ans="N";};
its a yes/no question - basically if a user enters a y regardless of case or a empty (by just hitting enter) it will mean they entered yes, if anthing else, its no. whenever i put a y or a Y in it, it yeilds a N.
whats wrong with this code?