Is String a primitive data type?
Java Array

Quiz
•
Computers
•
University
•
Medium
Siti Tanalol
Used 133+ times
FREE Resource
23 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
30 sec • 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
25 questions
DSA - Q1

Quiz
•
University
25 questions
Java Review

Quiz
•
9th Grade - University
20 questions
2-mavzu. Kotlin dasturlash tilida tarmoqlanuvchi, takrorlanuvchi

Quiz
•
University
18 questions
PBO Inheritance Episode 2

Quiz
•
University
20 questions
Fianal JAVA OOP

Quiz
•
University
25 questions
Java Method

Quiz
•
University
20 questions
Java Quiz 1

Quiz
•
University
20 questions
C - Strings

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