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.

how can i fix this code?

+4 votes
asked Mar 2, 2022 by khadija saleh (160 points)
Main.java:5: error: cannot find symbol
Rectangle r1 = new Rectangle();
^
  symbol:   class Rectangle
  location: class Main
Main.java:5: error: cannot find symbol
Rectangle r1 = new Rectangle();
                   ^
  symbol:   class Rectangle
  location: class Main
2 errors

1 Answer

0 votes
answered Mar 5, 2022 by Peter Minarik (87,340 points)
Your class Rectangle is not found. Maybe you had a typo?

Can you share your whole code?
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.
...