Menu
Question Index
...

What will be the output of the following program?

public class A {
    public static void main(String args[]) {
        StringBuilder sb = new StringBuilder("Good Morning");
        sb.insert(1, "Friend ");
        System.out.println(sb);
    }
}


Good Morning
Friend Good Morning
Friend ood Morning
Some other output
Compilation Error or Runtime Error

Doubts

Problems

Topic: StringBuilder Class 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