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
JAVA: Level-1

Quiz
•
5th - 12th Grade
6 questions
Java while loops

Quiz
•
10th - 12th Grade
10 questions
Study Guide - More Advanced Java

Quiz
•
11th - 12th Grade
15 questions
Soal Java

Quiz
•
11th Grade - University
15 questions
UTS SMT Genap PBO 11 RPL

Quiz
•
11th Grade
10 questions
Java Quiz 1: Introduction

Quiz
•
6th - 12th Grade
6 questions
Topic 4.3 Video 1

Quiz
•
11th Grade
9 questions
String Methods

Quiz
•
12th Grade - University
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
Discover more resources for Computers
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
40 questions
LSHS Student Handbook Review: Pages 7-9

Quiz
•
11th Grade
10 questions
Characteristics of Life

Quiz
•
9th - 10th Grade
10 questions
Essential Lab Safety Practices

Interactive video
•
6th - 10th Grade
20 questions
Scalars, Vectors & Graphs

Quiz
•
11th Grade
62 questions
Spanish Speaking Countries, Capitals, and Locations

Quiz
•
9th - 12th Grade