Hi I am having problems with my code.
It is given me an error message stating "cannot find symbol variable
NotCont"where the arrow is.
Can some one help me with this please.
Thanks ^_^
import java.util.Scanner;
public class IntegerSetTest
{
public static void main(String[] args)
{
Scanner input = new Scanner (System.in);
System.out.println("Welcome to the Integer Set\n");
System.out.println("This program is going to find the union " +
" or intersection of any two sets you enter" +
"\nPlease enter the number of sets: ");
int intArray[] = new int[100];
int value;
try
{
do
{
int i;
value = input.nextInt();
intArray[i]=value;
System.out.println("Enter -1 to end: ");
int NotCont = input.nextInt();
i++;
---> }while(NotCont != -1);
for(int i=0; i<intArray.length;i++)
{
System.out.println(intArray[i]);
}
}
catch(NumberFormatException ex)
{
}
}
}
</code>
Enter your message below
Sign in or Join us (it's free).