I don't understand whats wrong with the following example:
public class String
{
public static void main(java.lang.String[] args)
{
String s = "Hello";
}
}
It says "Type mismatch: cannot convert from java.lang.String to String"
on the String s line. I tried to Import java.lang.String but didn't help.
String s = "Hello"does refer to the class you're defining. If your package is "com.mypackage",sis not ajava.lang.Stringbut acom.mypackage.String