String Handling in Java

Quiz
•
Computers
•
10th Grade
•
Hard
Swarn Mishra
Used 161+ times
FREE Resource
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Select correct relationship between index numbers and length of a string.
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 Wayground
11 questions
Trabajando con ArrayList

Quiz
•
9th - 12th Grade
10 questions
Python User Input Quiz

Quiz
•
6th Grade - University
8 questions
String Function Revision

Quiz
•
10th Grade
10 questions
Recursion in Java (AP Computer Science A)

Quiz
•
9th - 12th Grade
13 questions
Python Reflect

Quiz
•
8th Grade - University
12 questions
week 1 basic java coding language

Quiz
•
9th - 12th Grade
12 questions
Basic Python and Console Interaction - Mod3

Quiz
•
10th Grade
12 questions
Python Print Statement

Quiz
•
6th - 10th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
10 questions
1.2 OSI & TCP IP Models Quiz

Quiz
•
10th Grade
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
20 questions
Hardware vs. Software Quiz

Quiz
•
7th - 10th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade