Java Java Objects Harnessing the Power of Objects Handling Exceptions

I have the same compiler error over and over again...

JavaTester.java:70: error: Illegal static declaration in inner class Example public static void main(String[] args) { ^ modifier 'static' is only allowed in constant variable declarations 1 error

7 Answers

Jennifer Nordell
STAFF
Jennifer Nordell
Treehouse Staff

Hi there, Levente Lantos ! Yes, it seems there is a problem with Java-based challenges right now. This has been reported to Treehouse staff by myself and at least one other moderator. I feel confident that the Support staff is working on this.

That being said, you can skip the challenge by using the white "dots" at the top of the page where the challenge/video is. Clicking any one of these will take you to that section of the course. Don't forget to come back and finish the challenge once everything is working properly again.

Hope this helps! :sparkles:

And is there a way to skip a challenge? I wasted hours trying to figure out something and i want to continue work

Mitchell Golden
Mitchell Golden
4,804 Points

Yes, you can simply click the little circle icon above your code challenge just to the right of the one you are currently on (the current one is outlined with a circle). You could also click the small left arrow above that, with the title of the track you are working on, and you can select manually which portion of the course you wish to go to.

Mitchell Golden
Mitchell Golden
4,804 Points

I'm working on another challenge right now and getting some weird compiler errors that should not be happening. I looked at this one also, and I agree that it makes no sense. I think something is up with the workspace right now.

Alright then i will go back to those challenges later, im just gonna skip them right now, thank you guys for the help!!

Rahul Saini
Rahul Saini
4,611 Points

I am pretty sure the cause of the exception is. usage of two main functions. JavaTester.java has its own: public static void main(), Function and when it calls Example.main(null) surely compiler finds another main function within the same package.

I am still having this issue with other challenges too

Jennifer Nordell
Jennifer Nordell
Treehouse Staff

Levente Lantos with other languages as well? Note that I said "Java-based challenges". When I said that, I meant all challenges based on the Java programming language. So I'm curious if this is also happening in another programming language.

Nicolas Hampton
Nicolas Hampton
42,692 Points

Levente Lantos Thanks so much for reporting this. This appears to be strictly a problem for Java challenges currently, and only for tonight. A fix should be deployed first think tomorrow (Monday). I'll see if I can let support know that you found a bug so you get your bug exterminator badge!