Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
class, interface, or enum expected?
I get twelve errors when compiling asking for a class, interface, or enum on a bunch of random lines. Normally this is because I miss/add a bracket, but I have checked all of them and nothing is working. Any help on this?
@Ratchetr, I have Eclipsed installed, but I just havn't taken the time to learn how to use it. Now that i'm getting into game programming I should probably learn how to use a good IDE like that. From the beginning of my Java study I have been using the standard command line java compiler with Notepad++ (for syntax highlighting). I eventually came out with the code the works here:
1 Answer
- RatchetrLv 79 years agoFavorite Answer
Change this:
private void p1Brake extends Thread{
To this:
private class p1Brake extends Thread{
Do the same for p2Brake.
Eclipse is also showing me a bunch of other errors and warnings
You have a bunch of these:
if (p1Direction = RIGHT)
You need to use == here.
ETA:
What are you using to edit your code? Are you using a tool that shows you your errors as you code? Because you should never EVER let so many errors accumulate without fixing them as you go. A good IDE (Eclipse being one, but there are others) will smack you in the face for every error you make, and even suggest how to fix it. You aren't using anything like that, are you? Or are you just ignoring all the errors and warnings?