Quiz
String Method Review
Questions in this quiz (2)
1Consider the following code segment:
String newString = "Welcome";
String anotherString = "Home";
newString = anotherString + "Hello";
What is the value of newString?- AHomeHello
- BHelloHello
- CWelcomeHello
- DWelcome Hello
- EHome Hello
2Which of the following returns the last character of the string str?
- Astr.substring(0);
- Bstr.substring(0, str.length());
- Cstr.substring(length(str));
- Dstr.substring(str.length()-1);
- Estr.substring(str.length());
Information
- Description
- AP Computer Science Quiz on String Method Review, created by Shannon Anderson-Rush on 05/10/2020.
- Author
- Shannon Anderson-Rush
- Language
- English
- Views
- 1,214
- Tags
- Rating
- No ratings yet Rate this quiz