. 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 object data type?

0 Answers  


jdbc drivers?

8 Answers   Wipro,


Can we cast any other type to boolean type with type casting?

0 Answers  


What is loop in java?

0 Answers  


How to print nodes of a Binary tree?

0 Answers  


what is for datainputstream?

1 Answers  


What is the difference between panel and frame ?

7 Answers   HCL, IBM, Raim Techno Solutions,


Explain the access modifiers for a class, method and variables?

0 Answers   Global Logic,


what is the difference between the methods sleep() and wait()? : Java thread

0 Answers  


What is the vector class in java programming?

0 Answers  


How do I get 64 bit java?

0 Answers  


Why is method overloading not possible by changing the return type in java?

0 Answers  


Categories