. 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 is meant by distributed application? Why are we using that in our application?
Why string objects are immutable in java?
What are kinds of processors?
Is class forname reflection?
Are true and false keywords?
Does java have a compiler?
What is an infinite loop? How infinite loop is declared?
What is sortedset in java?
What are three types of loops in java?
What are void methods?
What is a substring of a string?
What is the difference between size and length in java?
What is java and why do we need it? Explain
Write a program to print the pattern given below
Can you access non static variable in static context?