PPT Slide
We can:
String strInput1 = new String ();
String strInput2 = new String
(“A valid constructor.”);
Result:
strInput1 will be an empty
String (with the value ““)
strInput2 will be a String containing “A valid constructor.”
Constructors
Given:
public String ( )
public String (String value)
Previous slide
Next slide
Back to first slide
View graphic version