Which data type gets returned from length() method in String class?
JAVA string

Quiz
•
Computers
•
12th Grade
•
Hard
Quizizz Content
Used 26+ times
FREE Resource
18 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
double
String
int
number
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
String txt = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
What is the correct way to find the length of "txt" string?
int len = length(txt);
float len = txt.length();
int len = txt.length();
double len = length(txt);
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which is correct method to convert String into uppercase
changeUpperCase()
convertUpperCase()
toUpper()
toUpperCase()
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is word.charAt(7) ?
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is word.length()?
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method to use to find length of a string?
length()
size()
long()
count()
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Choose correct purpose of indexOf() in String class.
returns the index (the position) of the last occurrence of a specified text in a string
returns the character of the first occurrence of a specified character in a string
returns the index (the position) of the first occurrence of a specified text in a string (excluding whitespace)
returns the index (the position) of the first occurrence of a specified text in a string (including whitespace)
Create a free account and access millions of resources
Similar Resources on Quizizz
15 questions
Python - Chpt 1 - Review

Quiz
•
9th - 12th Grade
13 questions
Python Data Types and Operators Skill #1

Quiz
•
12th Grade
20 questions
Array

Quiz
•
10th - 12th Grade
16 questions
Java Strings Mastery

Quiz
•
12th Grade
14 questions
Java Math and String Libraries

Quiz
•
9th - 12th Grade
20 questions
The String Class

Quiz
•
12th Grade
15 questions
File Handling in Python - Grade 12 CBSE

Quiz
•
12th Grade
15 questions
Java Arrays Prt 1Quiz

Quiz
•
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