Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


what diff bw constructor method & method

Answers were Sorted based on User's Feedback



what diff bw constructor method & method..

Answer / boopathy

method only accessed after create class object,
but constructor method access when object initialized

Is This Answer Correct ?    10 Yes 0 No

what diff bw constructor method & method..

Answer / prasad

A CONSTRUCTOR METHOD IS A METHOD USED TO PERFORM CUSTOM
INITIALIZATIONS.
AND A NORAMAL METHOD IS HAVING INSTANCE VARIABLES AND METHODS

Is This Answer Correct ?    4 Yes 2 No

what diff bw constructor method & method..

Answer / 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

what diff bw constructor method & method..

Answer / jasbir singh

a constructor method's name is same as the name of class,
secondly, you cannot manually call the constructor method
after creating the object.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer



More Java Related AllOther Interview Questions

What is jar file in java?

0 Answers  


Name primitive java types.

0 Answers  


What services can invoke lambda?

0 Answers  


What is phantom memory?

0 Answers  


What is optional in java 8? What is the use of optional?advantages of java 8 optional?

0 Answers  






Does ms edge support java?

0 Answers  


explain isalive() method under thread class?

0 Answers  


I get an exception if I remove the static modifier from main?

0 Answers  


Which version of my browser should I use? : java security

0 Answers  


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

0 Answers  


What are the advantages of lambda functions?

0 Answers  


In java what is the difference between sleep() and wait() .

0 Answers   Amazon,






Categories