I am wondering if
String s = new String("blabla");
is exactly the same as
String s = "blabla";
I think for the first one this constructor of the String class is called:
public String(char value[]) {
this.value = Arrays.copyOf(value, value.length);
}
but not sure if it's the same for the second one.
In other words, what is this "blabla" from Java point of view?
So while using String s = "blabla";
is s
a new stance of String
class? and if yes which of its constructors is called?