Differentiate constructor and a method and how are it be
used?
Answer Posted / devarathnam c,kotagudibanda(po
Hi...
Constructor(): It is also a method but it doesnot allow
return type even void also.It will call automatically
whenever an object is created of a appropriate class.
But class name and constructor should be the same.d
Method():U have to call explicitly .
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Why does java not allow multiple public classes in a java file ?
How big is a gigabyte?
What is the similarity between dynamic binding and linking?
What is java dot?
What is java util hashmap?
Which command from the jdk compiles a java program?
Difference between overriding and overloading in java?
What is the use of callablestatement?
What is a parameter in simple terms?
Can the garbage collection be forced by any means?
Explain the difference between an Interface and an Abstract class?
What are heterogeneous objects?
What is meant by polymorphism?
How does sublist works in java?
Give me an example of array and linked list? Where they can be used?