class BreakExample2
{
public static void main(String[] args)
{
System.out.println("(Please enter a number from 1 to 6)");
ConsoleReader console = new...
Type: Posts; User: Tedstriker
class BreakExample2
{
public static void main(String[] args)
{
System.out.println("(Please enter a number from 1 to 6)");
ConsoleReader console = new...
variable num is already defined in method main(java.lang.String[])
That is the exact error, with for(int num = 1; num < 6; num++) being highlighted.
Sorry, the error is related to this line:
for(int num = 1; num < 6; num++)
the error is "variable num is already defined in method main(java.lang.string{})
class BreakExample
{
public static void main(String[] args)
{
System.out.println("(Please enter a number from 1 to 6)");
ConsoleReader console = new...