Which of the following statements is true?

Options
- all methods are constructor
- all constructor are method
- Some constructor are method
- no constructor is method


CORRECT ANSWER : all constructor are method

Discussion Board
reply to previous comment

Yes... You are right constructor and method are two different things. Methods have return types but constructors don't have any. Not even void. So no method can be qualified as constructor and no constructor can qualify as method. You are right!.

Hardik 09-2-2015 11:06 AM

subject to how

am I missing something here? correct me if I'm wrong. A method has a signature and a return type and should be explicitly called by the programmer in the program where as Constructors does not have return type and are automatically called by JVM . According to me "no constructor is a method" is the right answer.

harris khan 01-28-2015 03:15 AM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement