Menu
Question Index
...

What will be the output of the following program?

public class FinallyDemo {
    class Manhattan {
        void doStuff() {
            System.out.println("X ");
        }
    }
    class TimesSquares extends Manhattan {
        @Override
        void doStuff() {
        }
    }
    public static void main(String[] args) {
        new FinallyDemo().go();
    }
    void go() {
        new TimesSquares().doStuff();
    }
}


X
X X
(No output)
Compilation Error
Runtime Error

Doubts

Problems

Topic: Java Finally Block In Exception Handling

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App