Question Index

What will be the output of the following program? Assume that we run the class Default.

class Default {
    static public void main(String[] abc) {
        System.out.println("Default class");
public class Defect {
    public static void main(String abc[]) {
        System.out.println("Defect class");
class Discuss {
    public static void main(String... args) {
        System.out.println("Discuss class");
class DailyDose {
    public static void main(String[] args) {
        System.out.println("DailyDose class");

DailyDose class
Discuss class
Defect class
Default class
Default class
Default class
Defect class
Some other output
Output can not be determined
Compilation Error or Runtime Error



Topic: Advanced Java Programming Concepts

Read this topic
Take test on this topic

Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App