Menu
Topics Index
...
`

Display


If you need explanation Read this topic

If you need Answer Take test on this topic

Display
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");
    }
}

A. Executed
Hai Hello U R Genius
Hai Hello U R Genius
Hai Hello U R Genius
B. Hai Hello U R Genius
Hai Hello U R Genius
Hai Hello U R Genius
Hai Hello U R Genius
C. (EMPTY)
(EMPTY)
Hai Hello U R Genius
Hai Hello U R Genius
D. Some other Output
E. Compilation Error or Runtime Error
Topic: Java String Arrays - String Arrays In Java

If you need explanation Read this topic

If you need Answer Take test on this topic

User comments below. All of them might not be correct.

Answer A .
variable argument is usd .
1st method ptints executed.
2,3,4th method hv int parametr so choose method havin both int n string.
n prints hai helo u  r genious

Posted by Anand Kumar    2014-07-17 09:09:58


a

Posted by Zeg Abder    2014-07-17 09:10:39


A.

Posted by Pothuluri Venkateswarlu    2014-07-17 09:22:45


ans is E...because display method without any arguments is called in the main method which does not exist

Posted by Badam Swathi    2014-07-17 14:58:03


ANS E : No corresponding overloaded method signatures was declared for display(), display(int)...

Posted by BalRam At    2014-07-17 15:03:17


Congratulations Anand Kumar. You are this dose winner. We will send you the link using which you can claim your recharge.

Posted by Merit Campus    2014-07-18 06:44:27


© meritcampus 2019

All Rights Reserved.

Open In App