CSC300 / CSC402: String Literal [6/24] Previous pageContentsNext page

Try java.lang.String

String x = "Hello";
String y = "Hello";
x=Hello, y=Hello
                  x==y : true
   Objects.equals(x,y) : true
           x.equals(y) : true
eqs01

Java does this for efficiency.

Previous pageContentsNext page