Duplicate definition of class

C

Chris Lawson

Hi,
I'm made a few classes and they were all in the one file ... now i'm putting
a punch of them into another file (i called it myInterfaces) it contains the
interfaces for the classes as well as implementations.

The problem is that the complier is complaing that i have a duplicate
definition of the classes in the second file but they are NOT listed in the
original file, they are all removed ...

Any ideas why i am getting this message?

Kind regards
Chris
 
E

E.C. Bäck

Chris Lawson said:
Hi,
I'm made a few classes and they were all in the one file ... now i'm putting
a punch of them into another file (i called it myInterfaces) it contains the
interfaces for the classes as well as implementations.

The problem is that the complier is complaing that i have a duplicate
definition of the classes in the second file but they are NOT listed in the
original file, they are all removed ...

Any ideas why i am getting this message?

Kind regards
Chris

In addition to cleaning the .java source files up, did you delete the old
..class files?
--
Thanks,
Elliott C. Bäck

Sophomore, Computer Science
Cornell University
 
A

AJ

Chris Lawson said:
Hi,
I'm made a few classes and they were all in the one file ... now i'm putting
a punch of them into another file (i called it myInterfaces) it contains the
interfaces for the classes as well as implementations.

The problem is that the complier is complaing that i have a duplicate
definition of the classes in the second file but they are NOT listed in the
original file, they are all removed ...

Any ideas why i am getting this message?

Kind regards
Chris


Number one, by convention (or at least my convention), all classes and
interfaces should have their own file. It is easier to keep track
that way. Have you removed the class files, and re-compiled the
original source files? Otherwise, I can't tell you what is wrong
without seeing some code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top