String Methods and Characters

String Methods and Characters

10th - 12th Grade

10 Qs

quiz-placeholder

Similar activities

Examen final algoritmo

Examen final algoritmo

11th Grade

12 Qs

Quizz Internet

Quizz Internet

KG - Professional Development

12 Qs

BÀI KIỂM TRA GIỮA KÌ 2 LỚP 5

BÀI KIỂM TRA GIỮA KÌ 2 LỚP 5

1st - 10th Grade

10 Qs

Archivos Digitales

Archivos Digitales

9th Grade - University

14 Qs

Tecnología Digital

Tecnología Digital

12th Grade

12 Qs

Chapter 3 Exploring Linux Filesystems

Chapter 3 Exploring Linux Filesystems

11th Grade - University

10 Qs

IP ADDRESSING AND ITS VERSION

IP ADDRESSING AND ITS VERSION

11th Grade

15 Qs

Parcial 1, Primera serie

Parcial 1, Primera serie

6th Grade - University

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?