Menu
Question Index
...

What will be the output of the following program?

public class CanYouGuess {
    public static void main(String[] args) {
        System("a", "b", "c", "d", "e", "f");
        Radio('f', 'e', 'd', 'c', 'b', 'a');
        TV(1, 2, 3, 4, 5, 6, 7, 8, 9);
        new CanYouGuess().Mobile(0.0, 0, 0, 2.0);
    }
    void Mobile(double... d) {
        System.out.print(d[3]);
    }
    static void System(String... str) {
        for (String c : str)
            System.out.print(c);
        System.out.println();
    }
    static void Radio(char... chr) {
        for (char c : chr)
            System.out.print(c);
        System.out.println();
    }
    static void TV(int... is) {
        for (int i : is)
            System.out.print(i);
        System.out.println();
    }
}


nullnullnull
nullnullnull
nullnullnull
2.0
abcdef
fedcba
123456789
2.0
abc
fed
123
2.0
Some other output
Compilation Error or Runtime Error

Doubts

Problems

Topic: Unknown

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App