Answer Posted / sowjanya
constructor is special method with the basic initialization
information of the class variables.this constructor is
accessed at the time of object creation .from this object is
created with initial assignment values of variables. and we
can't call constructor separately.
if you have more than one constructor default constructor is
invoked at the object creation time and we can call other
constructor as we need .
constructor name is same as class name this is way to
identify methods is constructor.
methods are not invoked not default we call that as we
need.method name is not a class name.
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Describe life cycle of thread?
What is flatmap in rxjs?
Why serialization is used in java?
What is the java virtual machine (jvm)?
How many types of jdk are there?
there are 67 seats in train . there are only 5 seats in a row and in last row there are only 2 seats. One person can reseve only 5 seat at a time. If person reserving seat , the care is atken that he may get all in row. if seats are not available in row then the arrangement is so that person group get nearby seats. the following class is given public class seat { char name; int seat; boolean isSeatempty } 1.Draw require class digram and object diagram. 2.Write function seatallot(int noofperson) to allocate seat with seat nuber printed for the each name.
What is the use of servlet in java?
I get an exception if I remove the static modifier from main?
What about javascript? : java security
I have deployed a .war file in my application server comprising of struts and hibernate.If i want to change the "dialect" property of hibernate cfg file how can i change(I have only .war file)... Thanks in advance
How do you find lambda?
Why do we only use the main method to start a program?
What java systems libraries and methods are available for me to use?
What is lambda value?
What is the meaning of loosely coupled in java?