Menu
Question Index
...

What will be the output of the following program?

public class Null {
    public static boolean greet() {
        System.out.print("Program execute = ");
        return true;
    }
    public static void main(String[] args) {
        System.out.println(Null.greet());
    }
}


Program execute = true
Program execute = false
Program execute = null
Program execute =
Some other output
Compilation Error or Runtime Error

Doubts

Problems

Topic: Creating Static Methods In Java Using Static Keyword

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App