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.

I'm trying to print the info of a subject in the main class from Subject class but it's showing can't find symbol.

+4 votes
asked Sep 21, 2022 by Ramya-Tavva (160 points)

2 Answers

0 votes
answered Sep 24, 2022 by Peter Minarik (84,720 points)

You should name your file Subject.java, not Subject.

I'll let you fix the other issues. Ask if you need more help!

Good luck! :)

0 votes
answered Sep 29, 2022 by Joy (140 points)

you should take your class name as like as your file name like if ur file name is Main than only you can save the info in Main class if your file name is subject.java than you will not able to save in main class so change the file into main and than save the data in main class .

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