Java String class methods

Quiz
•
Computers
•
10th - 12th Grade
•
Medium
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
Similar Resources on Wayground
15 questions
Javascript Quiz 2

Quiz
•
11th Grade
13 questions
Week 8

Quiz
•
12th Grade
11 questions
Python Projects Quiz

Quiz
•
6th Grade - University
15 questions
Quiz - 10 on switch in C

Quiz
•
12th Grade
12 questions
apcsa-String

Quiz
•
11th Grade
9 questions
Programming with Karel

Quiz
•
9th - 12th Grade
5 questions
Unity gMetrix Module 2

Quiz
•
12th Grade
15 questions
Java Beginners

Quiz
•
11th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
10 questions
1.2 OSI & TCP IP Models Quiz

Quiz
•
10th Grade
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
20 questions
Hardware vs. Software Quiz

Quiz
•
7th - 10th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade