
String Methods and Characters

Quiz
•
Computers
•
10th - 12th Grade
•
Hard
Courtney Yatteau
Used 3+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The following method will return true if and only if:
s starts with two or more of the same characters
s contains two or more of the same characters
s contains two or more of the same character in a row
s ends with two or more of the same characters
s.charAt(0) == s.charAt(1)
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Susan is 5 years older than Matt. Three years from now Susan’s age will be twice Matt’s age. What should be in place of the following condition to solve this problem?
s == (m - 5) && (2 * s + 3) == (m + 3)
(s == m - 5) && (s - 3 == 2 * (m - 3))
(s == (m + 5)) && ((s + 3) == (2 * m + 3))
s == m + 5 && s + 3 == 2 * m + 6
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Assuming that x and y have been declared as valid integer values, which of the following is equivalent to this statement?
(x > 15 && x < 18) && (x > 10)
(y < 20) || (x > 15 && x < 18)
((x > 10) || (x > 15 && x < 18)) || (y < 20)
(x < 10 && y > 20) && (x < 15 || x > 18)
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given the following method declaration, what will redo(82, 3) return?
5
4
6
7
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
"foxtrot".substring(3, 5)
What is returned by the substring above?
tr
xtr
xr
fotot
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
"tictactoe".indexOf( 'e' )
What is returned by indexOf?
7
8
9
10
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following segment of Java code print out?
4.5 5
4.5 4
4.5 4.0
4.5 4.5
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Bài thường xuyên số 3 Tin 10

Quiz
•
10th Grade
14 questions
Operators

Quiz
•
9th - 12th Grade
13 questions
Операторы If и Switch в C++

Quiz
•
10th Grade
10 questions
PHP ( Perulangan & Percabangan )

Quiz
•
12th Grade
15 questions
Bài 6 Câu lệnh rẽ nhánh

Quiz
•
10th Grade - University
10 questions
CP1 Assessment

Quiz
•
11th Grade
10 questions
Câu lệnh rẽ nhánh tin 10

Quiz
•
10th Grade
10 questions
TIN 11 BAI 6

Quiz
•
12th Grade - University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
20 questions
Analog vs Digital

Quiz
•
9th - 12th Grade
10 questions
CTEA Computer Vocab Terms #1

Quiz
•
12th Grade
10 questions
Exploring Cybersecurity Techniques and Threats

Interactive video
•
6th - 10th Grade
10 questions
Understanding the Internet and Data Transmission

Interactive video
•
7th - 12th Grade