I\'m a C++ guy learning Java. I\'m reading Effective Java and something confused me. It says never to write code like this:
String s = new String(\"silly\");
In Java the syntax "text" creates an instance of class java.lang.String. The assignment:
String foo = "text";
is a simple assignment, with no copy constructor necessary.
MyString bar = "text";
Is illegal whatever you do because the MyString class isn't either java.lang.String or a superclass of java.lang.String.