Start. Applet not initialized. My source code doesn't have any "bugs", but I am still unable to successfully run and compile the source code on Eclipse. How do I get the source code to successfully run and compile on Eclipse?
Asked
Active
Viewed 81 times
-2
-
2You have to declare the class in a file of the same name, e.g. `ConvertCelsiusToFahrenheit.java`. – Andy Turner Sep 03 '16 at 22:17
-
If you go to the "Problems" tab on the bottom, you can see exactly what's causing these bugs. – Jorn Vernee Sep 03 '16 at 22:19
-
"*My source code doesn't have any "bugs"*" not according to error message. Hover your mouse over underscored area and you should see error description. – Pshemo Sep 03 '16 at 22:20
-
_My source code doesn't have any "bugs"_ - every code has bugs ;) – Pyro2266 Sep 03 '16 at 22:26
1 Answers
0
You have a made a common error, often situated with novice Java programmers. You have a class named ConvertCelsiusToFahrenheit
, but the name of the file isn't the same. Remember, that one Java class is allowed per file (unless if nested or not public), and the file must have the same name as the class. See the question for why a file must me named as its class

Community
- 1
- 1

Arnav Borborah
- 11,357
- 8
- 43
- 88
-
-
"Remember, that one Java class is allowed per file" is simply not true. I can have many classes in one file, even many public ones if they are nested. – Pshemo Sep 03 '16 at 22:33
-