Which method would you use to check if two Strings are exactly the same? Options: equals(), equalsIgnoreCase(), toUpperCase(), toLowerCase()
Java String class methods

Flashcard
•
Computers
•
10th - 12th Grade
•
Hard
Quizizz Content
FREE Resource
Student preview

24 questions
Show all answers
1.
FLASHCARD QUESTION
Front
Back
equals()
2.
FLASHCARD QUESTION
Front
Which method is used to find the length of a string?
Back
length()
3.
FLASHCARD QUESTION
Front
Which data type gets returned from length() method in String class?
Back
int
4.
FLASHCARD QUESTION
Front
What is the correct way to find the length of the string "txt"? Options: int len = length(txt); float len = txt.length(); int len = txt.length(); double len = length(txt);
Back
int len = txt.length();
5.
FLASHCARD QUESTION
Front
String x = "10";
String y = "20";
String z = x + y;
System.out.println(z);
Guess the output.
Back
1020
6.
FLASHCARD QUESTION
Front
Which method is used to find the index of a specified character in a string? Options: charIndex(), indexOf(), findIndex(), searchIndex()
Back
indexOf()
7.
FLASHCARD QUESTION
Front
What is the output of the following code?
String str = "Hello";
System.out.println(str.substring(1, 3));
Back
el
Create a free account and access millions of resources
Similar Resources on Quizizz
16 questions
Lesson 3.5 - If Structures Practice

Flashcard
•
11th Grade
19 questions
Python Lists

Flashcard
•
11th Grade
20 questions
Unit 6 Test Review - Arrays

Flashcard
•
9th - 12th Grade
15 questions
Java - Flow of Control Flashcard

Flashcard
•
9th - 12th Grade
23 questions
Array & ArrayList Review

Flashcard
•
10th - 12th Grade
20 questions
Strings, Lists & Tuples

Flashcard
•
9th - 12th Grade
20 questions
Lists & Tuples

Flashcard
•
9th - 12th Grade
18 questions
Python Lists

Flashcard
•
9th - 12th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University