Can you call a constructor within a constructor?

Answer Posted / nikhlesh gupta datia(m.p.)

We can call one of base class constructor inside derive class constructor by using predefine variable "super()" such as super(a), super(a,b) and so on.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between superclass and subclass?

548


Is string is a class in java?

525


how to deploy tomcatserver to weblogic server? write d following steps?

1451


Explain what is Marker interface?

620


Can main() method in java can return any data?

646






What is boolean data type in java?

568


What is string pooling concept?

555


what is the volatile modifier for? : Java thread

523


Which class contains a method: cloneable or object?

542


Difference between static binding and dynamic binding?

568


What is method overloading with type promotion?

581


Why main method is called first in java?

546


When will you define a method as static in Java?

574


Can you access non static variable in static context?

559


What is the largest data type in java?

511