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 mq in java?

0 Answers  


Why java is better than node.js?

0 Answers  


Input :14000 Output : hundred and fourteen thousand.(wrong) Desired output : fourteen hundred thousand.

2 Answers   Sapient,


Which is the Best institute to do academic Project in Java? Need information about institutes at Ameerpet, Hyderabad.

8 Answers  


What are tags in java?

0 Answers  






What is java net url?

0 Answers  


How do I open my java console?

0 Answers  


Expain ur organisation process( V-model)?.

1 Answers   Cap Gemini,


Employee has a Passport. here employee is an object and passport is an object, give the class design

3 Answers  


Is it correct to say that using parentheses can only change?

0 Answers  


What is gpt and gpc? : java security

0 Answers  


What is the current code for the Java 5 code class Root { ?

3 Answers  


Categories