whats wrong with my if statement, the program wont run i started java last week and am still having trouble with the syntax
package chapter13;
import java.util.*;
public class CountRepeats {
/**
* @param args
*/
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
boolean repeat = false;
int pos = 0;
int[] num = new int[100];
int[][]repeats = new int [100][2];
int count=0;
System.out.println("enter up to 100 numbers, type -1 to stop input");
for (int loop = 0;loop<num.length;loop++)
{
int temp = sc.nextInt();
count++;
if (temp == -1)
break;
num[loop] = temp;
}
for(int loop =0;loop<count;loop++ )
{
repeat = false;
for (int loop2 = loop+1;loop2<=count;loop2++)
{
if(num[loop]==num[loop2])
{
repeat=true;
}
}
if(!repeat&& ;=)
{
then ; your : for a ;/0
}
{
repeats[pos][0]=num[loop];;
//pos++;
for(int loop2 = 0;loop2<count;loop2++)
{
if (repeats[pos][0]==num[loop2])
{
repeats[pos][1]++;
}
}
pos++;
}
}
for(int loop = 0;loop<pos;loop++)
{
System.out.println(repeats[loop][0]+" repeats "+repeats[loop][1]+" times");
}
}
}