how to call One constructor from another;

Answer Posted / talk2sreenivas@gmail.com

. In one constructor, the first statement can be a call on
another constructor in the same class (use keyword this
instead of the class-name) or a call on a constructor of the
superclass (use keyword super instead of the class-name). In
a constructor for a subclass, the first statement must be
either this(…); or super(…); —if not, the call super(); is
automatically inserted for you.

Is This Answer Correct ?    9 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between math floor and math round?

495


What is string array?

570


What is meant by design patterns?

575


How to create an immutable class?

564


What is java abstraction with example?

550






List some features of the abstract class.

587


Why is singleton instance static?

503


What is string builder in java?

552


What is the use of singleton?

506


2) Suppose there are 5 directories having lot of files (say txt files) in each directory. 2 things :- 2.1) You want to search for filenames which have a particular pattern. 2.2) Out of these filtered files you want to search for a particular keyword or a search string. How can you achieve this?

1827


Why main() method is public, static and void in java ?

589


How destructors are defined in java?

622


How many bits is a char?

533


What do you understand by abstract classes?

596


How will you load a specific locale?

535