Menu
Question Index
...

What will be the output of the following program? Assume that the argument passed as - MeirtCampus.

public class MyName {
    public static void main(String args[]) {
        if (args.length == 0 || args[0].equalsIgnoreCase("MeritCampus")) {
            System.out.println("I Dont Know");
        } else {
            System.out.println(args[0]);
        }
    }
}


(EMPTY)
MeritCampus
I Dont Know
Some other output
Compilation Error or Runtime Error

Doubts

Problems

Topic: if Condition 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