aheadoftime compiler that can be used to compile bytecode into native code
prior to
execution by the JVM, rather than onthefly. Aheadoftime compilation is a
specialized feature and it does not replace Java’s traditional approach just described.
Because of the highly sophisticated nature of aheadoftime compilation, it is not
something that you will use when learning Java, and it is not discussed further in this
book.
Ask the Expert
Q
: I have heard about a special type of Java program called a servlet.
What is it?
A
: A Java
servlet is a small program that executes on a server. Servlets
dynamically extend the functionality of a web server. It is helpful to understand
that as useful as clientside applications can be, they are just one half of the
client/server equation. Not long after the initial release of Java, it became obvious
that Java would also be useful on the server side. The result was the servlet. Thus,
with the advent of the servlet, Java spanned both sides of the client/server
connection. Although the topic of servlets, and serverside programming in
general, is beyond the scope of this beginner’s guide, they are something that you
will likely find of interest as you advance in Java programming.
Moving Beyond Applets
At the time of this writing, it has been more than two decades since Java’s original
release. Over those years, many changes have taken place. At the time of Java’s
creation, the Internet was a new and exciting innovation; web browsers were
undergoing rapid development and refinement; the modern form of the smartphone
had not yet been invented; and the near ubiquitous use of computers was still a few
years off. As you would expect, Java has also changed and so, too, has the way that Java
is used. Perhaps nothing illustrates the ongoing evolution of Java better than the
applet.
As explained previously, in the early years of Java, applets were a crucial part of Java
programming. They not only added excitement to a web page, they were a highly visible
Dostları ilə paylaş: