944,052 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 2657
  • Java RSS
Aug 17th, 2005
0

cant construct rectangle

Expand Post »
hi

im constructing a rectangle in main method, i wrote:
Java Syntax (Toggle Plain Text)
  1. rectangle t = new rectangle();

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

what is wrong?
Similar Threads
Reputation Points: 10
Solved Threads: 1
Posting Whiz
sam1 is offline Offline
300 posts
since Nov 2004
Aug 17th, 2005
0

Re: cant construct rectangle

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
Reputation Points: 11
Solved Threads: 8
Posting Whiz in Training
hooknc is offline Offline
216 posts
since Aug 2005
Aug 17th, 2005
0

Re: cant construct rectangle

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
Reputation Points: 10
Solved Threads: 1
Posting Whiz
sam1 is offline Offline
300 posts
since Nov 2004
Aug 17th, 2005
0

Re: cant construct rectangle

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
Reputation Points: 11
Solved Threads: 8
Posting Whiz in Training
hooknc is offline Offline
216 posts
since Aug 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: writing method
Next Thread in Java Forum Timeline: NewBie to Java needs some Help PLEASE!!!





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC