Java String class methods

Java String class methods

10th - 12th Grade

10 Qs

quiz-placeholder

Similar activities

STRING HANDLING

STRING HANDLING

10th Grade

10 Qs

Java Arrays Basic

Java Arrays Basic

10th - 12th Grade

15 Qs

JAVA: Level-1

JAVA: Level-1

5th - 12th Grade

15 Qs

Java Lab Code.org AP CSA

Java Lab Code.org AP CSA

12th Grade

10 Qs

BlueJ

BlueJ

10th Grade

10 Qs

Java switch/for/while

Java switch/for/while

9th - 12th Grade

15 Qs

String Method

String Method

10th Grade

10 Qs

Java String Methods

Java String Methods

10th - 12th Grade

10 Qs

Java String class methods

Java String class methods

Assessment

Quiz

Computers

10th - 12th Grade

Medium

Created by

Claire Firman

Used 40+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method would you use to check if two Strings are exactly the same?

equals()

equalsIgnoreCase()

toUpperCase()

toLowerCase()

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method would you use to see if two Strings contain the same letters but ignoring capitals and small letters?

equals()

equalsIgnoreCase()

toUpperCase()

compareTo()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method was used to convert this String: "IT learners are clever" to "IT LEARNERS ARE CLEVER" ?

toUpperCase()

toLowerCase()

equalsIgnoreCase()

compareTo()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method was used to convert this String: "Life is TOO SHORT to be BORED" to: "life is too short to be bored" ?

toLowerCase()

toUpperCase()

equals()

equalsIgnoreCase()

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

True or False:

("Andy".compareTo("Andrew") > 0)

True

False

6.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Good or Bad Java:

if (greeting == "hello")

Good

Bad

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will print?

if ("Mac".compareTo("Mug") > 0)

System.out.println("Mac comes before Mug")

nothing

Mac comes before Mug

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?