JAVA default constructors
This isn't making much sense to me. I don't have any trouble with the language and making a program that works, but the terminology keeps throwing me off. Can someone tell me what a default constructor is, and what it's purpose is? And if possible, write some code to show me what exactly it is, because I'm just not getting it.
My teacher, who has been VERY LITTLE HELP to me, said it's just to initialize values of certain variables. If this is true, why not just initialize them when you declare the variable? That is to say, why not do
double number1 = 100;
rather than,
double number1;
public default()
{
number1 = 100;
}
I hope my question was clear enough. I'm so confused right now I don't even know if I can ask question correctly. :-\
Thanks,
Ramzi