I have this loop but i dont know why it never check the condition,i thought it might for integer.tostring,please help if you can:
public static void linerSearch(String[] array1, int key){
int size = array1.length;
for(int i=0;i<size;i++){
if(array1[i] == Integer.toString(key)){ // < -- This line
System.out.println("The node is already in the list");
}
}
}