Choose the line that assigns "love" to str2.
String Methods

Quiz
•
Computers
•
9th - 12th Grade
•
Hard
David Hedin-Abreu
Used 462+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
str2 = str.substring(2,6);
str2 = str.substring(2,5);
str2 = str.substring(2);
str2 = str.substring(4);
2.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Choose the line that assigns "boba." to str2.
str2 = str.substring(7);
str2 = str.substring(7,11);
str2 = str.substring(8,12);
str2 = str.substring(8);
3.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Choose the line that assigns "I" to str2.
str2 = str.substring(0,1);
str2 = str.substring(1,2);
str2 = str.substring(0);
str2 = str.substring(1);
4.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
What is the output from running this code block?
equals method
== operator
(Nothing)
equals method
== operator
5.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
What is the result of running this code block?
"." is printed.
An exception is thrown.
"America." is printed.
"a" is printed.
6.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
What is the result of running this code block?
"." is printed.
An exception is thrown.
"America." is printed.
"a" is printed.
7.
MULTIPLE SELECT QUESTION
3 mins • 1 pt
What method-call below could be used to determine whether str contains the String "States"? Choose all that apply.
str.contains("States")
str.indexOf("States")
str.equals("States")
str.compareTo("States")
Create a free account and access millions of resources
Similar Resources on Quizizz
10 questions
AP CSA Unit 1 & 2 Review

Quiz
•
9th - 12th Grade
8 questions
String Handling in Java

Quiz
•
10th Grade
14 questions
Introduction to Strings

Quiz
•
12th Grade
10 questions
String Function Application in Python Quiz

Quiz
•
10th Grade
15 questions
Topic 3 & 4 Practice - ArrayList and String Methods

Quiz
•
12th Grade
10 questions
Mastering Python String Techniques

Quiz
•
9th - 12th Grade
10 questions
String Manipulation Quiz

Quiz
•
10th - 11th Grade
10 questions
Strings

Quiz
•
11th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University