Java Reference
In-Depth Information
Finally, you learned how to implement interfaces and inner classes, two structures that
are helpful when designing a class hierarchy.
Q&A
Q Won't using accessor methods everywhere slow down my Java code?
A Not always. As Java compilers improve and can create more optimizations, they
will be able to make accessor methods fast automatically, but if you're concerned
about speed, you can always declare accessor methods to be final , and they'll be
comparable in speed to direct instance variable accesses under most circumstances.
Q Based on what I've learned, private abstract methods and final abstract
methods or classes don't seem to make sense. Are they legal?
A Nope, they're compile-time error messages, as you have guessed. To be useful,
abstract methods must be overridden, and abstract classes must be subclassed,
but neither of those two operations would be legal if they were also private or
final .
Q I've been told that I should consider using Ant to manage my Java packages
and compile applications. What does Ant do?
A Apache Ant is an open source tool for compiling and packaging Java applications
and class libraries that is implemented with Java and Extensible Markup Language
(XML). With Ant, you create an XML file that indicates how your classes should
be compiled, archived, and organized. You can specify multiple targets for each
“build,” the term applied to the process, and easily produce multiple builds for each
stage of a project's development.
Ant, which can be downloaded from the website http://ant.apache.org, was created
by programmers for Jakarta, the open source Java project administered by Apache
that has produced Struts, Velocity, Tomcat, and many other useful Java class
libraries and technologies.
Jakarta projects are extremely extensive, requiring the management of hundreds of
Java classes, JAR archives, and other files. Ant was so useful in the creation of the
Tomcat web server that it became an Apache development project in its own right.
It has subsequently become the most popular build tool for Java programmers.
 
Search WWH ::




Custom Search