File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Default constructor ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Default constructor ? " Watch "Default constructor ? " New topic
Author

Default constructor ?

Sim Kim
Ranch Hand

Joined: Aug 06, 2004
Posts: 268
Which two are true ?

A. The default constructor initializes method variables.
B. The compiler always creates a default constructor for every class.
C. The default constructor invokes the no-parameter constructor of the superclass.
D. The default constructor initializes the instance variables declared in the class.
E. When a class has only constructors with parameters, the compiler does not create
a default constructor.
ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
I think C & E are correct .
Mike Gershman
Ranch Hand

Joined: Mar 13, 2004
Posts: 1272
Yes


Mike Gershman
SCJP 1.4, SCWCD in process
 
 
subject: Default constructor ?
 
Similar Threads
About constructor
a question about default constructor
a question about default constructor
of a default constructor question required
Default constructor