Question:What is the output of the given program?
public class Test118 extends _Test118 {
        {
                System.out.print("_INIT");
        }
        static {
                System.out.print("_STATIC");
        }
        Test118() {
                System.out.print("_CONST");
        }
        public static void main(String[] args) {
                System.out.print("_MAIN");
                new Test118();
        }
}
class _Test118 {
        _Test118() {
                System.out.print("_BASE");
        }
}
 

A _STATIC_MAIN_BASE_INIT_CONST 

B _STATIC_MAIN_INIT_BASE_CONST 

C _INIT_STATIC_MAIN_BASE_CONST 

D _INIT_STATIC_MAIN_BASE_CONST 

+ Answer
+ Report
Total Preview: 782

Copyright © 2024. Powered by Intellect Software Ltd