- #1
Niaboc67
- 249
- 3
I am programming in Eclipse and I keep seeing the error "
Type mismatch: cannot convert from int to String", not only in the example I am going to provide but other programs. I've just started programming in Java. Could someone explain to me what this error exactly means?
publicclassPracOne{
publicstaticvoidmain(String[] args){String s1 = 8;
String s2 = 8;
System.out.print(s1.equals(s2));
}
}
Type mismatch: cannot convert from int to String", not only in the example I am going to provide but other programs. I've just started programming in Java. Could someone explain to me what this error exactly means?
publicclassPracOne{
publicstaticvoidmain(String[] args){String s1 = 8;
String s2 = 8;
System.out.print(s1.equals(s2));
}
}