Ask coding questions

← Back to all posts
I keep compiler exit status 1
sprintokflash (2)

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

PattanAhmed (1397)

@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.

Hope this helps

Coder100 (16870)

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

public class Main
Coder100 (16870)

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

SixBeeps (5047)

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

sprintokflash (2)

@SixBeeps I dont see any difference?

sprintokflash (2)

@SixBeeps Ur right, im an idiot thx

sprintokflash (2)

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