test22.java:13: duplicate class: test22.abc class abc ^ test22.java:25: cannot find symbol symbol : class abc location: class test22 test22.abc x=me.new abc(); ^ test22.java:25: cannot find symbol symbol : class abc location: class test22 test22.abc x=me.new abc(); ^ 3 errors[CODE]
Thanks and Regards, Anand
SCJP 5.0 310-055 73%, SCWCD 1.4 310-081 78%, IBM DB2 9 Fundamentals 000-730 62%
From the Java Language Specification (JLS) 3rd Edition: "The $ character should be used only in mechanically generated source code or, rarely, to access preexisting names on legacy systems."
The Java compiler generates nested class names containing $, so programmers should definitely avoid using it in class names. Within string literals or as a character to be input, processed, and output, the appearance of '$' is perfectly normal.