Is String a primitive data type?
JAVA String-1.1

Quiz
•
Other
•
10th Grade
•
Medium
Nishat Khimani
Used 378+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Yes
No
Both
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method to use to find length of a string?
length()
size()
long()
count()
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which data type gets returned from length() method in String class?
double
String
int
number
4.
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);
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which is correct method to convert String into uppercase
changeUpperCase()
convertUpperCase()
toUpper()
toUpperCase()
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
String txt = "Hello World";
System.out.println(txt.toUpperCase());
Choose the correct output.
"HELLO WORLD"
HELLO WORLD
Hello world
Hello World
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
18 questions
Guess the Stray Kids member

Quiz
•
KG - Professional Dev...
15 questions
39W Final Exam PLTW

Quiz
•
9th - 12th Grade
15 questions
Semiotics - icon, index or symbol sign?

Quiz
•
10th Grade - University
16 questions
2020 kpop Quiz (Jan & Feb)

Quiz
•
5th Grade - Professio...
20 questions
HOME AND UPPER ROW KEYS TEST

Quiz
•
6th - 12th Grade
16 questions
Keyboarding Techniques

Quiz
•
KG - University
16 questions
kpop

Quiz
•
KG - University
17 questions
Devil fruit quiz

Quiz
•
6th Grade - Professio...
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 Other
17 questions
Chapter 12 - Doing the Right Thing

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

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

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