Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

can someone tell me why it wont work

–2 votes

4 Answers

0 votes
answered Feb 18 by anonymous
you must have to import java.util.*; package in order to use graphics......
0 votes
answered Feb 19 by Theodore Friedrich (300 points)
You named your shape file just "Shape." Rename it to "Shape.java" so it runs as java code and not as plain text.
0 votes
answered Feb 21 by zemiak (490 points)

Rename tab/file Shape to Shape.java
Move class Rectangle to file Rectangle.java

Each public class must be in file with same name as this public class.

0 votes
answered Aug 30 by Prerna Arora (140 points)
Rename your shape file with Shape.java.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...