ElT0mat3/FRC-Robot-2022/blob/main/Robot

In code line 32, Robot is underlined red

As you can see the error says

error: class Robot is public, should be declared in a file named Robot.java

You will need to rename either the class or the file such that they match. Your file is currently named Robot 2.java.

1 Like

What would I need to do to change the class or the file name?

You could change either. What is the purpose of having two Robot classes in your code?

One of them is for just testing out separate code to see what works well for our robot because I don’t know how to make a new code project other than the main one I have.

I would recommend naming the test class TestRobot in a file called TestRobot.java.

Thank you for the help, I managed to get it running after switching a few things around.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.