Menu
Question Index
...

What will be the output of following program?

public class RUGenius {
    static void display(int itn, String... variable) {
        System.out.println("Hai Hello U R Genius");
    }

    static void display(String... hai) {
        System.out.println("Executed");
    }

    public static void main(String[] args) {
        String display = "Hai Hello";
        display();
        display(10);
        display(15, display);
        display(15, "display", display, "Display", "Genius");
    }
}


Executed
Hai Hello U R Genius
Hai Hello U R Genius
Hai Hello U R Genius
Hai Hello U R Genius
Hai Hello U R Genius
Hai Hello U R Genius
Hai Hello U R Genius
(EMPTY)
(EMPTY)
Hai Hello U R Genius
Hai Hello U R Genius
Some other Output
Compilation Error or Runtime Error

Doubts

Problems

Topic: Java String Arrays - String Arrays 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