Body & Soul1 min ago
java
1 Answers
Im making a programme for my assignment which takes in user input via a JOptionPane inputbox. the programme should take the user input and give a diagalogue back.
for example for a deck of cards user types A. the program should return Ace, K - King, J - Jack, Q - Queen 2..10 should return two-ten etc
ive got it to recognise the numbers as ive converted the String into datatype int. and used the if statement e.g
if(input == 2)
System.out.println(''Two'');
but i dont know how i can get it to recognize Letters and return words... can anyone help?
for example for a deck of cards user types A. the program should return Ace, K - King, J - Jack, Q - Queen 2..10 should return two-ten etc
ive got it to recognise the numbers as ive converted the String into datatype int. and used the if statement e.g
if(input == 2)
System.out.println(''Two'');
but i dont know how i can get it to recognize Letters and return words... can anyone help?
Answers
Best Answer
No best answer has yet been selected by AutomaticGal. Once a best answer has been selected, it will be shown here.
For more on marking an answer as the "Best Answer", please visit our FAQ.
-- answer removed --