When i try to check if the method i coded is correct or wrong,this error outputs:
"The method existsHigher(int[], int) in the type TBA is not applicable for the arguments (int, int, int)"
I'm having a hard time figuring what is wrong here.
public class test{
public static void main(String[] args) {
existsHigher([3,2], 5);
}
public static boolean existsHigher (int[]a, int n) {
boolean isHigher = false;
for(int i = 0; i < a.length; i++) {
int[] b = new int[i];
if(b[i] < n) {
return isHigher;
}
}
return true;
}
}