import java.util.*;
public class array1
{
public static void main(String[]args)
{
int[] value = new int[1000];
Scanner keyboard = new Scanner(System.in);
for (int i = 0; value[i]!= -999 && i < 999; i++)
{
System.out.print("Enter number " +
(i + 1) + ": ");
value[i] = keyboard.nextInt();
if(value[i] == -999)
{
value=Scan1();
System.out.print(" ");
}
}
}
public static boolean Scan1(int[] num1)
{
int[] A = new int[1000];
int i, j;
for (i=0; num1[i] != -999 && i<-999; i++)
{
for (j=i+1;num1[j] != -999 && j<-999; j++)
{
if (A[i]==A[j])
return true;
}
}return false;
}
}
i want to calling the public static boolean Scan1(int[] num1) into main but i cannot do it.. can somebody tell me how?