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
STRING HANDLING

Quiz
•
10th Grade
15 questions
Строки python

Quiz
•
12th Grade
13 questions
APCSA Unit 3 Review

Quiz
•
9th - 12th Grade
13 questions
Unit 4 AP CSA Review

Quiz
•
12th Grade
10 questions
Mastering Python String Techniques

Quiz
•
9th - 12th Grade
10 questions
Java Code Tracing Practice A

Quiz
•
9th - 12th Grade
15 questions
AQA Computer Science GCSE - 3.1 Fundamentals of algorithms

Quiz
•
10th - 12th Grade
8 questions
Procedures Code Tracing

Quiz
•
9th Grade
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions

Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines

Quiz
•
Professional Development
12 questions
Dividing Fractions

Quiz
•
6th Grade
Discover more resources for Computers
25 questions
Spanish preterite verbs (irregular/changed)

Quiz
•
9th - 10th Grade
10 questions
Identify Slope and y-intercept (from equation)

Quiz
•
8th - 9th Grade
10 questions
Juneteenth: History and Significance

Interactive video
•
7th - 12th Grade
8 questions
"Keeping the City of Venice Afloat" - STAAR Bootcamp, Day 1

Quiz
•
9th - 12th Grade
26 questions
June 19th

Quiz
•
4th - 9th Grade
20 questions
Distance, Midpoint, and Slope

Quiz
•
10th Grade
20 questions
Figurative Language Review

Quiz
•
10th Grade
27 questions
STAAR English 1 Review

Quiz
•
9th Grade