Answer Posted / shiva
java allows objects to initilize themselves when they are
created .this automatic initilization is done wih the use
of constructor .a constructor is a special type of method
that has the same name of its class.when ever an object of
class is created,its constructor will be invoked and it
will initilized the object.the return type for a
constructor is not defined as it implicitly takes its class
type as return type.
| Is This Answer Correct ? | 5 Yes | 5 No |
Post New Answer View All Answers
How do you differentiate abstract class from interface?
What is the use of object and class classes?
What is subsequence of a string?
What do you understand by a Static Variable?
What are instance variables?
What does %4d mean in java?
What is the purpose of a volatile variable?
What is a condition in java?
What do you mean by access modifier?
What are advantages of exception handling in java?
what is mutual exclusion? How can you take care of mutual exclusion using java threads? : Java thread
Why declare Main() method as a static in java ?
What is array list in java?
Can we have multiple classes in single file ?
Can a class have a static inner class?