
JAVA substring 2
Authored by Isaac Karota
Computers
10th - 12th Grade
Used 4+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Which of the following would return "x" for String s = new String("abcxcba")?
s.substring(3)
s.substring(4)
s.substring(3,4)
s.substring(4,5)
2.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
What will myString.length() return?
26
27
28
29
3.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
What will myString.substring(12) return?
e
cience is awesome!
This is invalid
ence is awesome!
4.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
What will myString.substring(10,15) return?
Scien
c
cienc
cienc
5.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
What will myString.substring( myString.length()-1) return?
-1
e
This is invalid
!
6.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
What will myString.substring( myString.charAt(0)) return?
e
m
C
p
7.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
What will myString.substring( myString.charAt(1)) return?
C
o
m
e
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?