
java String StringBuffer
Authored by A Vijay Kumar
Computers
University
Used 16+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following print?
System.out.println( "And yet, it moves!".charAt(0) );
A
n
!
The statement is incorrect.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following print?
String str = "And yet, it moves!"
System.out.println( str.charAt( str.length() ) );
A
n
!
The statment is incorrect.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Examine the following fragment:
String cat = "Hello"
cat += " ";
cat += "World" ;
How many objects are constructed?
0
1
2
3
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Examine the following fragment:
String world = "World!";
StringBuffer buf = new StringBuffer( "Hello" );
buf.append(' ');
buf.append( world );
How many StringBuffer objects are constructed?
0
1
2
3
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which phrase best describes a String object after it has been constructed?
Changeable
Write Only
Read Only
Inaccessible
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which character of a StringBuffer has index 0?
leftmost
rightmost
no character
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
After a StringBuffer has been constructed, how many characters may be added to it?
No more after it has been constructed.
Only as many as the original capacity.
As many as needed; it will grow in size if necessary.
A new StringBuffer must be constructed each time characters are added.
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
15 questions
Computer Science Quiz
Quiz
•
University
10 questions
Java Control Flow statements
Quiz
•
University
16 questions
LA3.C3: Variables
Quiz
•
9th Grade - University
10 questions
C++ Array Quiz
Quiz
•
University
20 questions
Java Quiz 1
Quiz
•
University
15 questions
quiz pertemuan 2 asik ddp
Quiz
•
University
20 questions
TEST1.PY
Quiz
•
10th Grade - University
16 questions
Quiz #1
Quiz
•
University
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