Search Header Logo

JAVA substring 2

Authored by Isaac Karota

Computers

10th - 12th Grade

Used 4+ times

JAVA substring 2
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

Which of the following would return "x" for String s = new String("abcxcba")?

s.substring(3)

s.substring(4)

s.substring(3,4)

s.substring(4,5)

2.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

Media Image

What will myString.length() return?

26

27

28

29

3.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

Media Image

What will myString.substring(12) return?

e

cience is awesome!

This is invalid

ence is awesome!

4.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

Media Image

What will myString.substring(10,15) return?

Scien

c

cienc

cienc

5.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

Media Image

What will myString.substring( myString.length()-1) return?

-1

e

This is invalid

!

6.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

Media Image

What will myString.substring( myString.charAt(0)) return?

e

m

C

p

7.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

Media Image

What will myString.substring( myString.charAt(1)) return?

C

o

m

e

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?