Differentiate constructor and a method and how are it be
used?

Answer Posted / janet

Constructor will be automatically invoked when an object is
created whereas method has to be called explicitly.

Is This Answer Correct ?    10 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a local block?

643


Can we serialize arraylist in java?

548


Which is the class in java?

521


What is a class instance variable?

624


Can I overload to string method

972






What is the loop in java?

578


What invokes a thread's run() method in java programming?

571


What is the difference between the font and fontmetrics classes in java programming?

509


What is difference between module and function?

544


What is the difference between throw and throws in java?

559


How do you override a private method in java?

509


What is the use of static methods?

593


What are the application of stack?

506


What is type safety in java?

491


What are autoboxing and unboxing? When does it occur?

536