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 generic type?
When is the finalize() called? What is the purpose of finalization?
Explain the difference between throw and throws in java?
Tell me the latest versions in java related areas?
What is a constructor, constructor overloading in java?
What are the restriction imposed on a static method or a static block of code?
What does += mean coding?
How do I run java on windows?
How do you read and print a string in java?
What is a nested structure?
Why map is used in java?
How does finally block differ from finalize() method?
take an array with -ve and +ve value both.find out the nearest value of 0(zero).if two values are same like(-2 and +2)then extract +2 is nearest of 0(zero).
Which class cannot be a subclass in java?
How do you find the maximum number from an array without comparing and sorting?