Which is the Best Java Web Framework ?

Java - Things to know before your OCJP Exam - Constructor

1. Constructors can be overloaded.

2. * Constructors shouldn't have any return types , not even void.

3. * Default constructor is provided by the compiler if we don't declare any constructor. If we declare a parameterized constructor, Compiler will not create any default non parameterized constructor for the class.

4. A constructor can only have either this or super statement and that statement should be the first statement in constructor.

5. If Constructor has been declared private, Objects of the class cannot be instantiated from outside class.

6. If super is not explicitly called, still super() is intrinsically added by the compiler.

7. * Default Constructor initializes the instance variables to their default values.

8. * Final variables can be initialized within constructor.

Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner
comments powered by Disqus


Try our new Java Interview Questions Search Tool.

There are more than 1000 questions with practice tests.

It's updated daily and It's Awesome.


Try our new Java Practice Test tool.

There are more than 200 questions and expanding quickly. It's updated daily and It's Awesome.