
(2.7) String Methods
Authored by Robotics IsFun
Computers
12th Grade
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
20 questions
Pengantar Perangkat Keras
Quiz
•
7th Grade - University
20 questions
Computer parts
Quiz
•
1st - 12th Grade
15 questions
Adobe Digital Design 1.00 (Part 1)
Quiz
•
9th - 12th Grade
16 questions
Boolean and Search Operators
Quiz
•
9th - 12th Grade
16 questions
DATA SCIENCE Assessment (April)
Quiz
•
8th - 12th Grade
20 questions
Intro to IT Ch 3 Quiz Review
Quiz
•
9th - 12th Grade
20 questions
Diseño de Sistemas I
Quiz
•
1st - 12th Grade
16 questions
Prepare For Final Exam
Quiz
•
9th - 12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade