. 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
What are the different collection views provided by maps?
What is map and hashmap in java?
What is a double vs float?
How infinite loop is declared?
what is the difference between the methods sleep() and wait()? : Java thread
What are the benefits of immutable objects?
Hi friends am new to java. I read jar file means collection of java files. For executing struts application what are the necessary jar files. " struts.jar " file contains what. can u explain
What are benefits of java?
Can we use static class instead of singleton?
What is meant by flickering?
Will the compiler creates a default constructor if I have a parameterized constructor in the class?
what do you understand by the term string with respect to java?
How do you sing an Applet ?
What are untrusted applets?
What are methods and how are they defined?