please help me?when ever i am creating a class in a project folder every time it is showing two class file(.java file) with the same name..how to resolve this problem?for example if i create class A then Eclipse is creating the same class A below it with the same name as class A.thanks in advance...
Joined: Jul 17, 2008
it must be in different folder. Eclipse has concept of showing contents under soruce folder, plus you can the same in real folder (with different name)
Add a snapshot will illustrate your problem clearly.
please bear me if any mistake i have done over here as i am new to this forum.you can see here the same Demo.java file is automatically created.and if you delete the one than the other one also get deleted.i need only single java file.
This is an artifact of the way Eclipse displays source files. It lets you see the file within a directory structure (the Demo.java you have highlighted), and it also presents a view where source files are grouped by package (the Demo.java within the "(default package)" group. These are just two views of the exact same file.
I don't know why you don't also see A.java twice: it could be due to the type of project you created, or it could be due to the fact that you are creating classes without packages (which is frowned upon, you should always have a package statement as the first line of your source file.)