How to fix the error, unexpected token 'public' specified outside the scope of any class or model element in d35 x++
M_R Please mark answer/s verified that helps and fix your issues.
If the answers don't work then let us know.
This bracket is the issue, add it in the end of the code.
Closing bracket for the class should be on the last. You have added the method outside the opening and closing brackets of the class.
Thanks,
Girish S.
Hi,
Probably you have added the public keyword without creating main method using runnable class.
Can you show us the screenshot of your code?
Thanks,
Girish S.
Hi, Its suggesting that public keyword is found in the file or code where it should not be. Please share where you are getting this error.
Also, check this article
André Arnaud de Cal...
291,965
Super User 2025 Season 1
Martin Dráb
230,817
Most Valuable Professional
nmaenpaa
101,156