Zusammenfassung der Ressource
Frage 1
Frage
Consider the following code segment:
String newString = "Welcome";
String anotherString = "Home";
newString = anotherString + "Hello";
What is the value of newString?
Antworten
-
HomeHello
-
HelloHello
-
WelcomeHello
-
Welcome Hello
-
Home Hello
Frage 2
Frage
Which of the following returns the last character of the string str?
Antworten
-
str.substring(0);
-
str.substring(0, str.length());
-
str.substring(length(str));
-
str.substring(str.length()-1);
-
str.substring(str.length());