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
What is difference between stringbuffer and string?
How to change the priority of thread or how to set the priority of thread?
What is an arraylist in java?
What is meant by data hiding/encapsulation?
What are parsing rules?
What carriage return means?
How can you avoid serialization in child class if the base class is implementing the serializable interface?
Is 64bit faster than 32 bit?
What are access specifiers available in java?
What is getclass () getname () in java?
What are thread groups?
What is meant by stack and queue?
What is role of void keyword in declaring functions?
Can an interface be final?
Explain the difference between serializable and externalizable in java?