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

How do I find jre version?

0 Answers  


Iam working as a Project Lead in a s/w comp.The follwing question was asked in HCL interview. What about the schedule slippage? If the developer has taken more time than the specified time. How do you adjust the time? From where do you allocate that extra time for the developer?

2 Answers   HCL, Logesys,


How do I know if I have jre or jdk?

0 Answers  


How can I check single byte, double byte of character in JTextField?(eg. japan unicode and English unicode)

0 Answers  


How do you count in java?

0 Answers  






Sytem.out.println(" "); this code what mean

2 Answers  


How do I enable java in google chrome?

0 Answers  


What if I do not provide the string array as the argument to the method?

0 Answers  


What is messaging queue in java?

0 Answers  


Which Institute is good for learning Java technologies?

1 Answers  


What is lambda used for?

0 Answers  


write a code in jsp to swap two numbers?

7 Answers   Wipro,


Categories