File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Class Already Defined Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Class Already Defined" Watch "Class Already Defined" New topic

Class Already Defined

vinay kalal

Joined: Sep 19, 2010
Posts: 9
I am facing one problem in this type of pro-gramme where i use Class name as a Return type or pass object as an argument like here , i am getting same error(the class already defined), i am using eclipse.
Kiaamaa Liammes
Ranch Hand

Joined: Oct 03, 2009
Posts: 32

the code compiles fine , in eclipse using Java 1.6

Rob Spoor

Joined: Oct 27, 2005
Posts: 19542

Is there another file with a class called Test?

How To Ask Questions How To Answer Questions
Mina Daoud
Ranch Hand

Joined: Sep 24, 2010
Posts: 88
Can you check if your package has another file with the same class name?
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 36478
Welcome to the Ranch Mina Daoud
Mina Daoud
Ranch Hand

Joined: Sep 24, 2010
Posts: 88
Campbell Ritchie wrote:Welcome to the Ranch Mina Daoud

Thanks Campbell Ritchie
I agree. Here's the link:
subject: Class Already Defined
Similar Threads
Using Objects as Parameters - an example
I am confused
Using Objects as Parameters
Using Objects as Parameters
Using Objects as Parameters