Prepare
Practice
Interview
Aptitude
Reasoning
English
GD
Placement papers
HR
Current affairs
Engineering
MCA
MBA
Online test
Login
Online Practice Test
>
Java 7
« Previous
Next »
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
« Previous
Next »
Write your comments
*
*
Email must be in the form someone@domain.com
*
*
Enter the code shown above:
Please enter the code shown above
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)
Related Content
Java Beginner (11)
Java (39)
Java (40)
Java (22)
Java (30)
Java (25)
Java (20)
Java (20)
Core Java (20)
Core Java (10)
Core Java (72)
EJB (20)
JDBC (20)
Applet (20)
Struts (21)
Servlets (20)
Java Web Services (20)
Javascript (40)
J2EE (10)
jQuery (46)
Advertisement
▲