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 (320 points)
You named your shape file just "Shape." Rename it to "" so it runs as java code and not as plain text.
0 votes
answered Feb 21 by zemiak (430 points)

Rename tab/file Shape to
Move class Rectangle to file

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
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.