Java Reference
In-Depth Information
replace('.', File.separatorChar) + ".class");
The main lesson of this puzzle and the previous one is: Be careful when using unfamiliar library
methods. When in doubt, consult the Javadoc. Also, regular expressions are tricky: Problems tend
to show up at run time rather than compile time.
For API designers, it is important to use a method-naming scheme that distinguishes methods whose
behavior differs in significant ways. Java's String class is not perfect in this regard. For many
programmers, it is not easy to remember which string-replacement methods use literal strings and
which ones use regular expressions or replacement strings.
< Day Day Up >
 
 
Search WWH ::




Custom Search