What will be the result of the following code execution?

class Super {
    Super() {
        System.out.println("Super contructor");

public class Main extends Super {
    Main() {
        System.out.println("Main() contructor");
    Main(int i) {
        System.out.println("Main(int) contructor");
    public static void main(String [] args) {
        new Main();  

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
Java quizzes
Sign Up Now
or Subscribe for future quizzes