
(2.7) String Methods

Quiz
•
Computers
•
12th Grade
•
Medium
Raheem Chowdhury
Used 2+ times
FREE Resource
20 questions
Show all answers
1.
FILL IN THE BLANK QUESTION
1 min • 1 pt
String str = "Hello World";
int len = str.length();
System.out.prinlnt(len);
What is the output?
Answer explanation
the length() method returns the number of characters in a String
2.
FILL IN THE BLANK QUESTION
1 min • 1 pt
String str = "CompSci Rocks";
int len = str.length();
System.out.prinlnt(len);
What is the output?
Answer explanation
the length() method returns the number of characters in a String
3.
FILL IN THE BLANK QUESTION
1 min • 1 pt
String str = "Hello World";
String part = str.substring(0, 1);
System.out.println(part);
What is the output?
Answer explanation
the substring() method returns specific section of a String
4.
FILL IN THE BLANK QUESTION
1 min • 1 pt
String str = "CompSci Rocks";
String part = str.substring(0, 1);
System.out.println(part);
What is the output?
Answer explanation
the substring() method returns specific section of a String
5.
FILL IN THE BLANK QUESTION
1 min • 1 pt
String str = "Hello World";
String part = str.substring(3, 4);
System.out.println(part);
What is the output?
Answer explanation
the substring() method returns specific section of a String
6.
FILL IN THE BLANK QUESTION
1 min • 1 pt
String str = "CompSci Rocks";
String part = str.substring(3, 4);
System.out.println(part);
What is the output?
Answer explanation
the substring() method returns specific section of a String
7.
FILL IN THE BLANK QUESTION
1 min • 1 pt
String str = "Hello World";
String part = str.substring(2, 7);
System.out.println(part);
What is the output?
Answer explanation
the substring() method returns specific section of a String
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Python Basics Review (TSK)

Quiz
•
9th - 12th Grade
15 questions
Intro to Java Loops

Quiz
•
9th - 12th Grade
20 questions
Basic Python

Quiz
•
10th - 12th Grade
15 questions
Python Revision Tour - I

Quiz
•
12th Grade
20 questions
Python Basics (CodeHS)

Quiz
•
7th - 12th Grade
20 questions
Python Data Types Quiz

Quiz
•
10th Grade - University
20 questions
Python Basic 1

Quiz
•
12th Grade
15 questions
Python2

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