Are constructors methods?



Are constructors methods?..

Answer / Ravi Rawat

Yes, constructors in Core Java are special methods that are used to create and initialize objects. Unlike regular methods, constructors do not have a return type (not even void), and their name must be the same as the class they belong to.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is identifier in java?

1 Answers  


How does compareto work in java?

1 Answers  


Difference between JDK, JRE, JVM

16 Answers   Deloitte, HCL, Mind Tree, Oracle, Reliance, TCS, ThinkBox,


How do you reverse a word in java?

1 Answers  


why marker interfaces are there in java

4 Answers   Digital Group,


Can a java program have 2 main methods?

1 Answers  


What are some characteristics of interference class?

1 Answers  


Can you add null to a list java?

1 Answers  


Can we use a default constructor of a class even if an explicit constructor is defined?

1 Answers  


What is the disadvantage of synchronization?

1 Answers  


What is the immediate parent class of the Applet class?

1 Answers  


how a programmer confirms that the data submitted has been succesfully inserted into the database(either oracle or my sql).. How a programmer confirm if there is any problem with the program he wrote for insertion... ANS:--- >executeupdate method is having boolean return type, if anything goes wrong in data insertion or data updation, it would return false. otherwise, if it successfully inserts data into the database, it would return true NOW HOW TO I CHECK IN MY DURING EXECUTION WHETHER IT RETURNS TRUE OR FALSE... WELL IT WILL DISPLAY ANY MESSAGE OR NOT

1 Answers   Google,


Categories