String Methods and Characters

String Methods and Characters

10th - 12th Grade

10 Qs

quiz-placeholder

Similar activities

KT 15 PHUT

KT 15 PHUT

10th Grade

10 Qs

Espacio Opcional 3er Año Pío XII

Espacio Opcional 3er Año Pío XII

10th Grade

10 Qs

11° Evaluación bimestral de informática

11° Evaluación bimestral de informática

11th Grade

15 Qs

Auto-Analisis evaluación 11

Auto-Analisis evaluación 11

10th - 11th Grade

10 Qs

Thinglink

Thinglink

9th - 12th Grade

10 Qs

Начала программирования на языке Паскаль

Начала программирования на языке Паскаль

8th - 11th Grade

15 Qs

RAM&HDD/SSD

RAM&HDD/SSD

10th - 12th Grade

13 Qs

Evaluación Unidad 4 Compartiendo información

Evaluación Unidad 4 Compartiendo información

10th Grade

10 Qs

String Methods and Characters

String Methods and Characters

Assessment

Quiz

Computers

10th - 12th Grade

Practice Problem

Hard

Created by

Courtney Yatteau

Used 3+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

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

Media Image

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

Media Image

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

Media Image

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

Media Image

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

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?