Join
Blogs
Questions
Videos
Tags
Members
Search
 
 
Create your own blog, earn points and get popular!

Arguments

Bharat's picture

What happens if you create one argument constructor and do not create constructor without argument?

5
Your rating: None Average: 5 (1 vote)
If class does not define any constructors, Java automatically creates default constructor with no arguments.  However, if constructor with arguments is specified, Java does not create default one.
 
Nothing happens if we do not specify the default constructor. However,
Andr's picture

Java Programming Tutorial - Variable Length Arguments

Video Tutorial: 
See video
Syndicate content