Menu
Question Index
...

What will be the output of the following program?

public class UsingChar {
    public static void main(String args[]) {
        StringBuffer buf = new StringBuffer("Shekar started business");
        buf.charAt(5);
        System.out.print(buf);
        buf = buf.deleteCharAt(buf.charAt(5));
    }
}


Sheka started business
Shekarstarted business
Shekar started business
Compilation Error
Runtime Error

Doubts

Problems

Topic: Java delete() and deleteCharAt() Methods In StringBuffer

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App