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
14 questions
Table Formatting

Quiz
•
KG - University
10 questions
Microsoft Word

Quiz
•
1st - 10th Grade
10 questions
Buttons and Ports on a Computer

Quiz
•
10th - 12th Grade
14 questions
7.5 Search Algorithms

Quiz
•
12th Grade
10 questions
Search Algorithms

Quiz
•
9th - 12th Grade
10 questions
GCSE Computer Science 9-1: Sorting Algorithms

Quiz
•
10th Grade - University
11 questions
Sorting Algorithms

Quiz
•
9th - 10th Grade
5 questions
CodeHS 3.8 String Processing

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

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

Interactive video
•
6th - 10th Grade
10 questions
Proper Keyboarding Techniques

Interactive video
•
6th - 10th Grade
10 questions
Understanding Computers: Hardware, Software, and Operating Systems

Interactive video
•
7th - 12th Grade
29 questions
AP CSP Unit 2 Review (Code.org)

Quiz
•
10th - 12th Grade