+ 2

public static void main(String args[]) Runnable() { public void run() { new RegisterMenu().setVisible (true);

What is wrong with this code

1st May 2023, 6:21 PM
Yahya Rafli hidayah
Yahya Rafli hidayah - avatar
5 Réponses
+ 5
Please don't post your code in the title. Read the following and that might help us to help you: https://www.sololearn.com/discuss/3021159/?ref=app https://code.sololearn.com/Wek0V1MyIR2r/?ref=app
1st May 2023, 6:45 PM
Ausgrindtube
Ausgrindtube - avatar
+ 3
Not sure what you are trying to do but it seems you are tying to implement Runnable class to another class. Main() is a method inside a class, so maybe you are trying to do: class SomeClass implements Runnable { public static void main(String args[]) {...} public void run() {...} }
1st May 2023, 6:30 PM
Hrvoje Kožul
+ 3
Yahya Rafli hidayah What I can see wrong: 1. The code is incomplete. You tried to paste it in the quesion title, which is meant for, you guessed, the title. Save your code in Code Playground and add a link to it in the question description - use "+" button. Question *description* - not title, nor comments. This way, we can run and debug your code. 2. There's no information about what the code should do. Add *in the question description* the purpose of your code. 3. There's no information about errors or wrong output. Add *in the question description* an explanation of the results you consider wrong.
2nd May 2023, 12:00 AM
Emerson Prado
Emerson Prado - avatar
+ 2
Write your code in a separate file in order to read it
1st May 2023, 11:38 PM
Hasnain [ACTIVE CHALLENGER]
Hasnain [ACTIVE CHALLENGER] - avatar
+ 1
thank you for your participation
1st May 2023, 6:26 PM
Yahya Rafli hidayah
Yahya Rafli hidayah - avatar