no lemon no melon
no lemon no melon

Reputation: 127

Trouble following the HelloWorld instructions in Eclipse IDE with Java

I'm having trouble with the Hello World instructions provided from Eclipse IDE for Java:

enter image description here

I followed the instructions exactly, but I can't click finish because of the error message.

This is my first time using Eclipse, sorry in advance if this is considered too simple or a dumb question. Thanks in advance.

Upvotes: 1

Views: 118

Answers (2)

Aalexander
Aalexander

Reputation: 5004

In the Error above you can see the message

Type already exists.

This means that you have already a class with that name in this package.
(When you don't have created a package you'll be in the default package)

Now you can decide if you use the already declared HelloWorld class or you create a new class with another name inside this package.

Another possibility is that you can create a new package and inside this package you can have another HelloWorld class.

Upvotes: 1

Nihir Kumar
Nihir Kumar

Reputation: 38

The error shows that Type already exists which means that there is already an existing class in your source file with the name HelloWorld.java

Try changing your class name and it will accept.

Upvotes: 1

Related Questions