Explain role of constructor in a java application?

Answer Posted / harini

The main purpose of construtor is to initialize instance
variables.

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is runtime locatable code?

858


Tell me about different OOPS concepts.

585


What is protected access modifier?

565


What do you mean by platform independence? What is an interface?

563


What are the five major types of reference sources?

524






Are global variables initialized to zero?

505


What is the difference between inheritance and encapsulation?

587


Can a class be a super class and a sub-class at the same time? Give example.

788


What is computer compiler?

525


What is the difference between dom and sax parser in java?

525


Explain an algorithm to find depth of a binary tree.

540


What is passing parameters in java?

509


What is the method overriding?

612


How to retrieve data from database in java using arraylist?

522


What is super?

578