
String Methods and Characters
Quiz
•
Computers
•
10th - 12th Grade
•
Practice Problem
•
Hard
Courtney Yatteau
Used 3+ times
FREE Resource
Enhance your content in a minute
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
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Repaso Integral de Contenidos. Proyectos
Quiz
•
2nd - 10th Grade
10 questions
Internet seguro
Quiz
•
8th Grade - University
10 questions
Baze de date-Design
Quiz
•
12th Grade
9 questions
Los periféricos del computador
Quiz
•
1st Grade - Professio...
13 questions
Podsumowanie: binarny, komputer, sieć
Quiz
•
7th Grade - University
10 questions
Keyboarding Terms
Quiz
•
9th - 12th Grade
10 questions
Komputer dan Jaringan Dasar Semester 2 - Implementasi dan Analisis Jaringan
Quiz
•
10th Grade
10 questions
TIN 10 - LẦN 1 - STVB 1
Quiz
•
10th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
