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