Java Classes Question:
Download Questions PDF

In this example class-var = new classname( ); The class name followed by parentheses specifies the _________ for the class
A) Variables
B) Constructor
C) Objects
D) Memory

Answer:

Constructor

Download Java Classes Interview Questions And Answers PDF

Previous QuestionNext Question
If the method does not return a value, its return type must be void

A) True
B) False
Methods declared as static have several restrictions:1) They can only call other static methods.2) They must only access static data.3) They cannot refer to this or super in any way Which of these are TRUE?

A) 1 and 2
B) 1 and 3
C) 2 and 3
D) 1, 2 and 3