Consider the following code segment:
String newString = "Welcome";
String anotherString = "Home";
newString = anotherString + "Hello";
What is the value of newString?
Answer
HomeHello
HelloHello
WelcomeHello
Welcome Hello
Home Hello
Question 2
Question
Which of the following returns the last character of the string str?