Heads and Tails java game help!
I'm trying to write a game using java. its a heads or tails game. the program is going to ask the user to choise either H for heads or T for tails. I'm trying to use a do-while loop and its not working with me. can someone help me writing the game?
plus i'm using JOptionPane.
thank you everyone
Re: Heads and Tails java game help!
If you want help with code, you'll have to provide an SSCCE that demonstrates what you're doing and where you're stuck. You have to be specific- what's not working?
Re: Heads and Tails java game help!
Hello abraham.mikhail. Welcome to the forums.
We will need to see your code to be able to help you!
A tutorial on different loops can be found here - http://www.javaprogrammingforums.com...ava-loops.html
Here is a JOptionPane example:
Code Java:
import javax.swing.JFrame;
import javax.swing.JOptionPane;
public class OptionPane {
public static void main(String[] a) {
JFrame frame = new JFrame();
Object result = JOptionPane.showInputDialog(frame, "Enter something:");
System.out.println(result);
}
}