Menu
Question Index
...

What will be the output of the following program?

public class SwitchBoard {
    public static void main(String[] ats) {
        String x = "mno";
        x.toUpperCase();
        String y = x.replace('n', 'n');
        y = y + "abc";
        System.out.println(y);
    }
}


mnoabc
MnOabc
MNOabc
abcMnO
abcmno
Compilation Error or Runtime Error

Doubts

Problems

Topic: toLowerCase() And toUpperCase() 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