Is String a primitive data type?
arrays and strings in java

Quiz
•
Computers
•
12th Grade
•
Medium

Geetu Chopra
Used 55+ times
FREE Resource
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Yes
No
Both
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
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)
4.
MULTIPLE SELECT QUESTION
1 min • 1 pt
What will be the output of below code?
String statement = "Outfit of the day";
System.out.println(statement.Substring(3,6));
it of
tfit
fit
FIT
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Choose most appropriate purpose of trim() method in String?
to remove white spaces
to get a substring of the string
to cut String at desired index
to remove extra white spaces from start and end of String
6.
MULTIPLE SELECT QUESTION
1 min • 1 pt
(Multiple answer question)
Pick all NON-primitive datatypes from below :
String
int
primitive
Array
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct relation between length and last-index of array?
last-index is always 1 more than the length
last-index is 1 less than the length (but not always)
last-index is always 1 less than the length
last-index is always equal to the length
Create a free account and access millions of resources
Similar Resources on Quizizz
20 questions
Python Strings: words, letters and text

Quiz
•
10th - 12th Grade
20 questions
CHAPTER 9 AND 10

Quiz
•
12th Grade
20 questions
Array

Quiz
•
10th - 12th Grade
20 questions
Java Arrays

Quiz
•
9th - 12th Grade
20 questions
APCSA Arrays

Quiz
•
9th - 12th Grade
20 questions
Unit 6 ArrayLists and String Methods

Quiz
•
9th - 12th Grade
20 questions
AP CS A Unit 6 Exam PRACTICE

Quiz
•
9th - 12th Grade
20 questions
LOOKUP

Quiz
•
9th Grade - 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
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