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
what is an objects lock and which objects have locks? : Java thread
Is arraylist ordered in java?
Can we declare an array without size in java?
What is class array in java?
Given a singly linked list, how will you print out its contents in the reverse order? Can you do it with consuming any extra space?
How long will it take to learn java?
Explain 5 io best practices?
Can private method static?
What is difference between final and finally in java?
What java ide should I use?
What is the intersection and union methods?
What is difference between stringbuffer and string?
Define iterator and methods in iterator?
What is the epoch date?
Explain the purpose of garbage collection in Java?