1.

Which of these is the method which is executed first before execution of any other thing takes place in a program?(a) main method(b) finalize method(c) static method(d) private methodThis question was addressed to me by my college professor while I was bunking the class.Origin of the question is Methods Taking Parameters topic in portion Classes and Methods of Java

Answer»

Right answer is (c) STATIC method

For explanation I would say: If a static method is present in the PROGRAM then it will be EXECUTED first, then MAIN will be executed.



Discussion

No Comment Found

Related InterviewSolutions