I have got the following code in a file called test.java which is located inside the directory C:\\D\\JavaProjects
class test
{
public static void ma
Presumably you're running on Windows, right?
That means you can't have two classes which differ only in case - because they'll both end up wanting to be in the same file, as Test.class
and test.class
are effectively the same filename in case-insensitive file systems.
It's not really a bug in Java - just an unfortunate but natural corollary of using a case-insensitive file system in conjunction with a language which attaches meaning to filenames.