. 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 |
Can private class be inherited in java?
Explain the difference between intermediate and terminal operations in java8?
What is arrays sort in java?
Different types of modifiers?
What two classes are used to read data only?
0 Answers TryTechnicals Pvt Ltd,
What does java final mean?
What is a variable in java?
There are 100 keys and values in HashMap.how to get the keys and values?
What are the latest versions in JAVA related areas?
what are the uses of Class class and what it returns? explain it with the example code.
What is the base class of all classes?
whats the purposr of using serialization?