cant construct rectangle

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Nov 2004
Posts: 257
Reputation: sam1 is an unknown quantity at this point 
Solved Threads: 1
sam1's Avatar
sam1 sam1 is offline Offline
Posting Whiz in Training

cant construct rectangle

 
0
  #1
Aug 17th, 2005
hi

im constructing a rectangle in main method, i wrote:
  1. rectangle t = new rectangle();

but i get message on compilation:
  1. cannot find symbol
  2. symbol:constructor retcangle()
  3. location:class rectanlge()
  4. rectangle t = new rectangle();
  5. ^

what is wrong?
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 216
Reputation: hooknc is an unknown quantity at this point 
Solved Threads: 8
hooknc hooknc is offline Offline
Posting Whiz in Training

Re: cant construct rectangle

 
0
  #2
Aug 17th, 2005
There are a few things that could be the problem.

My first guess is that the class is actually a Rectangle instead of a rectangle.

Second, the Rectangle class might not have a zero parameter constructor. It might only have a constructor of Rectangle(int length, int width).

Third, from your post, unless you didn't cut and paste, there is a typo with the constructor found by this error: symbol:constructor retcangle().

Regards,

Nate
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 257
Reputation: sam1 is an unknown quantity at this point 
Solved Threads: 1
sam1's Avatar
sam1 sam1 is offline Offline
Posting Whiz in Training

Re: cant construct rectangle

 
0
  #3
Aug 17th, 2005
so if i am missing the parameters from the class how do i write it in the construting object. and how do i knw how many parameters i have
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 216
Reputation: hooknc is an unknown quantity at this point 
Solved Threads: 8
hooknc hooknc is offline Offline
Posting Whiz in Training

Re: cant construct rectangle

 
0
  #4
Aug 17th, 2005
If the Rectangle class your's? If so, can you post the class? If the class isn't your's there should be generated java doc for that class that explains how to use the class.

Regards,

Nate
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Java Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC