Differentiate constructor and a method and how are it be
used?
Answer Posted / arunji,shc
constructor it should be same name of class but method name
is userdefined.
when the object created constructor call automatically but
method through the object have to call.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is the use of default method in interface in java? Explain
Difference between ‘>>’ and ‘>>>’ operators in java?
How to sort an array from smallest to largest java?
Why does java not support operator overloading?
How do you escape in java?
What are the different tags provided in jstl?
What do you mean by byte code?
How can we use primitive data types as objects?
What does the “final” keyword mean in front of a variable? A method? A class?
Can we have two main methods in a java class?
What is the difference between the paint() and repaint() methods in java programming?
How to set the permissions to a file in java?
What is java object name?
What is a boolean used for?
how we can make a write-only class in java?