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
explain isalive() method under thread class?
What is meant by annotation in java?
What is the use of flatmap in java 8?
What is jdk jre and jvm?
What is connection pooling in java?
Which interceptor is responsible for setting action javabean properties?
Differences between intermediate operations and terminal operations of java 8’s stream api?
Why java is better than node.js?
Why dependency injection is used in java?
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 flatmap java?
What is the difference between collection and stream?
What is tier in java?
What is mdb in java?
Who created eclipse?