Thread: Some Java help
View Single Post
02-09-2009   #1 (permalink)
Shugi
I am a girl. =)
Special
Shugi's Avatar
Games
AuditionCounter-Strike OnlineGunboundHabbo Hotel
Awards MoM AwardTwitter Fan
 
Join Date: Dec 2008
Location: Behind you
Posts: 3,253
iTrader: (1)
Shugi has a reputation beyond reputeShugi has a reputation beyond reputeShugi has a reputation beyond reputeShugi has a reputation beyond reputeShugi has a reputation beyond reputeShugi has a reputation beyond reputeShugi has a reputation beyond reputeShugi has a reputation beyond reputeShugi has a reputation beyond reputeShugi has a reputation beyond reputeShugi has a reputation beyond repute
Send a message via AIM to Shugi Send a message via Skype™ to Shugi
IGN: Penor
Xfire: shugix
Default Some Java help

I have some problems understanding overloaded constructors...

So I created 2 constructors which are the following:
Code:
	//Contructor
	public Rectangle() {
		storedLength = 1;
		storedWidth = 1;
	}
	
	//Constructor
	public Rectangle(double length, double width) {
		storedLength = length;
		storedWidth = width;
	}
I know that the first method will set the default values, but I don't really understand how to incorporate the second one into my client code. =/ Any ideas or explanation of constructors would be appreciated.
__________________
+Rep me if u think i be ballin, u no wat i sayin?

Steam: Shugi | Battle.net: Shugi#1454 | LoL.NA: xShugi | GW2: xShugi.3601