Select correct relationship between index numbers and length of a string.
String Handling in Java

Quiz
•
Computers
•
10th Grade
•
Hard
Swarn Mishra
Used 156+ times
FREE Resource
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
They both are assigned by user
They both are always equal
Last index number is one less than the length of string
Last index number is one more than the length of string
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of following statement-
System.out.println("Jai Jagat".length());
8
7
9
2
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of following statement-
System.out.println("Jai Jagat".charAt(1));
J
j
a
Jai
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following statement can be used to print last character of string "str"
System.out.println(str.charAt(str.length()-1));
System.out.println(str.charAt(str.length()));
5.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Select all correct statement(s) about "String" data type of java-
String is a class
String is an array of characters
String values are enclosed between " "
We can use "+" operator with strings
6.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Following is a statement to print first character of a string, compete it by filling the blank-
System.out.println(str.charAt(____));
7.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Following is a statement to print last character of a string having 22 characters, compete it by filling the blank-
System.out.println(str.charAt(____));
8.
MULTIPLE SELECT QUESTION
1 min • 1 pt
Select any two correct statements-
length returns total number of characters of a string
length() is a method
length is a property
length() counts total number of elements of an array
Similar Resources on Quizizz
10 questions
Array

Quiz
•
10th Grade
10 questions
Delphi Arguments/Returns

Quiz
•
8th - 10th Grade
10 questions
Java Code Tracing Practice A

Quiz
•
9th - 12th Grade
12 questions
CodeHS 3.5 String Methods

Quiz
•
9th - 12th Grade
10 questions
Java Quiz 1: Introduction

Quiz
•
6th - 12th Grade
12 questions
N5 SDD - Python input and output

Quiz
•
7th - 11th Grade
10 questions
Java Character and String class methods

Quiz
•
10th - 12th Grade
10 questions
Mastering Python String Techniques

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