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 immutable state?
Can you give names of Container classes?
What is linked hashset and its features?
What is anti pattern in java?
What is the difference between double and float variables in java?
For class CFoo { }; what default methods will the compiler generate for you>?
What is difference between variable declaration and definition?
Can the interface be final?
What is string intern in java?
Describe string intern() methodology
How does predicate work in java?
How many inner classes can a class have?
What are format specifiers in java?
How do you use nextline in java?
Is java a compiler?