briprogram
MIS
Working on piece of code for awhile but do not see why I am getting the ';' expected, syntax error for the if statement.
--------------------------
Thanks
Brian
Code:
package squaresdialog;
import javax.swing.JOptionPane;
public class Main {
public static void main(String[] args) {
String amount =
JOptionPane.showInputDialog(null,"Enter a number from 1 to 5");
int number = Integer.parseInt(amount);
[b] If ( number < 6 && number > 0 )[/b]
JOptionPane.showMessageDialog(null,"Must be a number less than 6", "Message - Please note", JOptionPane.INFORMATION_MESSAGE);
} //End Main
} //End Class squaresdialog
--------------------------
Thanks
Brian