Skip to content
← Back to Community
I keep compiler exit status 1
Profile icon
sprintokflash

Just begging with Java, experimenting with user input via keyboard, but the code isn't getting past compiling, any idea why?
idk

Voters
Profile icon
XTZ1TAP
Profile icon
uragoof2x123
Profile icon
arrowandbow
Profile icon
charinratjaroen
Profile icon
sprintokflash
Comments
hotnewtop
Profile icon
PattanAhmed

@sprintokflash Hi Gingrbred,
I think on line 2, you have entered your class name as UserInput.
To solve the error you have to change your second line code to this:-
I.E Main

public class Main

That's it.
Thanks!

Hope this helps

Profile icon
Coder100

ok, your class is named wrong. Your file name is called Main so your class should follow suit.

public class Main {
Profile icon
Coder100

exiting status is not an error, that's an action performed by java because of an error.

Profile icon
SixBeeps

It should be main(String[] args) and not main{String[] args}

Profile icon
sprintokflash

@SixBeeps I dont see any difference?

Profile icon
sprintokflash

Oh wait nvm

Profile icon
sprintokflash

@SixBeeps Ur right, im an idiot thx

Profile icon
sprintokflash

@SixBeeps I changed that, but it is still producing the same error