mercredi 20 juillet 2016

I've been trying to get my code right on java and I can't

I am pretty new to Java programming and I am trying to include an if-else statement with a JOptionPane.showOptionDialog command, however the code shown below is showing errors in the Eclipse IDE. I am trying to have something print after an option is chosen. What is wrong with my current code? If I put the if else statement after the instance variable, Eclipse shows multiple errors saying I need braces. However if I put it above, I cannot use the int n, as it is not defined and I cannot use options because that results in an error as well. Here's a link to my code (just copy pasted on a website, I was too lazy to do the indent): http://ift.tt/1Br3LhD

Aucun commentaire:

Enregistrer un commentaire