Menu
Question Index
...

What will be the output of the following program?

public class Append {
    public static void main(String args[]) {
        StringBuffer rb = new StringBuffer();
        rb.append("use pen instead of pencil");
        rb.appendCodePoint(50);
        System.out.print("After append Code: " + rb);
    }
}


After append Code: use pen instead of pencil
After append Code: use pen instead of pencil62
After append Code: use pen instead of pencil2
After append Code: use pen instead of pencil32
Compilation Error or Runtime Error

Doubts

Problems

Topic: Additional StringBuffer Methods In Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App