MCQs > IT & Programming > Java > 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'); } }

Java MCQs

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"); } }

Answer

Correct Answer: _STATIC_MAIN_BASE_INIT_CONST

Explanation:

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

Java Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Java Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it