im a astudent @ LTHS, in my forst year of Java, how do i make a default, and non-default contructor, and how to they work?
brokenbentou
0
Newbie Poster
Recommended Answers
Jump to PostA default constructor is one that takes no parameters and sets the initial values for the class.
Not exactly. Constructors can have arguments, or no arguments. If you do not create any constructors, the compiler gives you a "default" constructor which is a no-args constructor that simply calls the superclasses' …
All 4 Replies
thines01
401
Postaholic
Team Colleague
Featured Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
kvprajapati
commented:
Great explanation
+6
brokenbentou
0
Newbie Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.