Notice: Undefined offset: 16343563 in /var/www/html/qa-external/qa-external-users.php on line 744
I have a program in Java and it says that public static void is an illegal start of the expression whats - OnlineGDB Q&A
Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

I have a program in Java and it says that public static void is an illegal start of the expression whats

+3 votes
asked Jul 21, 2025 by Audrea Zigler (150 points)

2 Answers

0 votes
answered Jul 23, 2025 by Peter Minarik (101,340 points)
The compiler is usually right.

However, it's unclear what's wrong with your code without being able to see the code.

Please, share the code in question so we can find out what is wrong.
0 votes
answered Jul 30, 2025 by manikandan (140 points)
based on the code the error has different meanings.

may be you include more curlybraces than expected.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and receive answers from other members of the community.
...