When I compile the following little program named Gary.java, I get the following error:
Incompatible type for declaration. Can't convert java.lang.string to
string.
Here's my Gary.Java program generating the error:
public class Gary
{
static public void main(String args[])
{
String tmp = "boy";
}
}
Q1) What's causing this compile error?
Q2) What class are the primitives in (if any) such as integer?
Isn't everything including primitives a subclass of Object?