. What are the differences between constructor and method of a class in Java?
Answer Posted / 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 View All Answers
Why does java not support operator overloading?
How can you set the applet size?
What do you understand by abstract classes?
What are the types of strings?
How do you check if a character in a string is a digit or letter?
What is dynamic binding(late binding)?
Is void a data type in java?
What are the fileinputstream and fileoutputstream?
how are methods defined?
What do you know about the garbage collector in java?
Write a program to check string is palindrome without using loop?
What is procedure overloading?
What does it mean to flush a file?
What is the purpose of garbage collection in java?
Are registers volatile?