Ask coding questions

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

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

Comments
hotnewtop
PattanAhmed (1404)

@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

Coder100 (18109)

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

public class Main
{
Coder100 (18109)

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

SixBeeps (5219)

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

sprintokflash (3)

@SixBeeps I dont see any difference?

sprintokflash (3)

@SixBeeps Ur right, im an idiot thx

sprintokflash (3)

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