| | |
cant construct rectangle
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
hi
im constructing a rectangle in main method, i wrote:
but i get message on compilation:
what is wrong?
im constructing a rectangle in main method, i wrote:
Java Syntax (Toggle Plain Text)
rectangle t = new rectangle();
but i get message on compilation:
Java Syntax (Toggle Plain Text)
cannot find symbol symbol:constructor retcangle() location:class rectanlge() rectangle t = new rectangle(); ^
what is wrong?
•
•
Join Date: Aug 2005
Posts: 216
Reputation:
Solved Threads: 8
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
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
![]() |
Similar Threads
- Heap problem at run time (C++)
- A little Help (C++)
- for loops (C)
Other Threads in the Java Forum
- Previous Thread: writing method
- Next Thread: NewBie to Java needs some Help PLEASE!!!
| Thread Tools | Search this Thread |
actuate android api applet application applications array arrays automation balls bank binary bluetooth business c++ chat class classes clear client code codesnippet collections component database defaultmethod development dice doctype dragging ebook eclipse error event exception formatingtextintooltipjava fractal froglogic game givemetehcodez graphics gui hql html ide image infinite input integer intersect invokingapacheantprogrammatically j2me java javaprojects jni jpanel julia linux list loop looping map method methods mobile mysql netbeans newbie openjavafx parameter php print problem program programming project recursion repositories scanner screen scrollbar server set size sms sort sorting sql sqlserver state storm string sun superclass swing swt text-file threads tree windows





