java String StringBuffer

java String StringBuffer

University

15 Qs

quiz-placeholder

Similar activities

StringBuffer

StringBuffer

University

10 Qs

COSC_1436_ MOD-01 & MOD-02 Quiz

COSC_1436_ MOD-01 & MOD-02 Quiz

University

16 Qs

POS - Prelim Examination

POS - Prelim Examination

University

20 Qs

java script

java script

University

10 Qs

Java Basics 1

Java Basics 1

University

10 Qs

Sains Komputer (Java) 1: Sintaks Asas & Pembolehubah

Sains Komputer (Java) 1: Sintaks Asas & Pembolehubah

10th Grade - University

10 Qs

Javascript

Javascript

KG - Professional Development

13 Qs

Java Programming RBVRRIT

Java Programming RBVRRIT

University - Professional Development

10 Qs

java String StringBuffer

java String StringBuffer

Assessment

Quiz

Computers

University

Hard

Created by

A Vijay Kumar

Used 16+ times

FREE Resource

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.

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?