. What are the differences between constructor and method of a class in Java?



. What are the differences between constructor and method of a class in Java?..

Answer / nashiinformaticssolutions

Initializing the state of the object is done by constructors. A function Object () { [native code] }, like methods, contains a group of statements (or instructions) that are carried out when an object is created. A method is a group of statements that work together to complete a certain task and return the outcome to the caller. A method has the option of working without returning anything.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is an example of declaration?

0 Answers  


What is variable and its types?

0 Answers  


What is the difference between this() and super()?

15 Answers   TCS,


What do you understand by looping in java? Explain the different types of loops.

0 Answers  


How many types of voids are there?

0 Answers  


what is the use of servlet engine?

2 Answers   Photon,


What does || mean in code?

0 Answers  


Explain the protected field modifier?

0 Answers  


Is it possible for a yielded thread to get chance for its execution again?

0 Answers  


I need help please send me reply: Write a program "if given a string like 'HAT', the combination's returned should be like ATH,THA,TAH in java"?

4 Answers  


what is the purpose of "virtual"?

0 Answers   EDS,


Define nashorn in java8.

0 Answers  


Categories