Menu
Question Index
...

What will be the output of the following program?

public class Brothers {
    public static void main(String[] args) {
        String name = "RAMA";
        StringBuffer reName = new StringBuffer(name);
        reName.reverse();
        System.out.println(reName);
    }
}


RAMA
AMAR
Compilation Error
Runtime Error

Doubts

Problems

Topic: Java StringBuffer, reverse() - Reverse A String 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