System, but they may not be reproduced for publication


PARTICULAR PURPOSE. McGraw­Hill Education and its licensors do not warrant or



Yüklə 83 Mb.
Pdf görüntüsü
səhifə2/82
tarix19.04.2023
ölçüsü83 Mb.
#106251
1   2   3   4   5   6   7   8   9   ...   82
Java A Beginner’s Guide, Eighth Edition ( PDFDrive )


PARTICULAR PURPOSE. McGraw­Hill Education and its licensors do not warrant or
guarantee that the functions contained in the work will meet your requirements or that
its operation will be uninterrupted or error free. Neither McGraw­Hill Education nor its
licensors shall be liable to you or anyone else for any inaccuracy, error or omission,
regardless of cause, in the work or for any damages resulting therefrom. McGraw­Hill
Education has no responsibility for the content of any information accessed through the
work. Under no circumstances shall McGraw­Hill Education and/or its licensors be
liable for any indirect, incidental, special, punitive, consequential or similar damages
that result from the use of or inability to use the work, even if any of them has been
advised of the possibility of such damages. This limitation of liability shall apply to any
claim or cause whatsoever whether such claim or cause arises in contract, tort or
otherwise.


T
Introduction
he purpose of this book is to teach you the fundamentals of Java programming. It uses
a step­by­step approach complete with numerous examples, self tests, and projects. It
assumes no previous programming experience. The book starts with the basics, such as
how to compile and run a Java program. It then discusses the keywords, features, and
constructs that form the core of the Java language. You’ll also find coverage of some of
Java’s most advanced features, including multithreaded programming, generics,
lambda expressions, and modules. An introduction to the fundamentals of Swing
concludes the book. By the time you finish, you will have a firm grasp of the essentials
of Java programming.
It is important to state at the outset that this book is just a starting point. Java is more
than just the elements that define the language. Java also includes extensive libraries
and tools that aid in the development of programs. To be a top­notch Java programmer
implies mastery of these areas, too. After completing this book, you will have the
knowledge to pursue any and all other aspects of Java.
THE EVOLUTION OF JAVA
Only a few languages have fundamentally reshaped the very essence of programming.
In this elite group, one stands out because its impact was both rapid and widespread.
This language is, of course, Java. It is not an overstatement to say that the original
release of Java 1.0 in 1995 by Sun Microsystems, Inc., caused a revolution in
programming. This revolution radically transformed the Web into a highly interactive
environment. In the process, Java set a new standard in computer language design.
Over the years, Java has continued to grow, evolve, and otherwise redefine itself. Unlike
many other languages, which are slow to incorporate new features, Java has often been
at the forefront of computer language development. One reason for this is the culture of
innovation and change that came to surround Java. As a result, Java has gone through
History
Topics
Tutorials
Offers & Deals
Highlights
Settings
Support
Sign Out


several upgrades—some relatively small, others more significant.
The first major update to Java was version 1.1. The features added by Java 1.1 were
more substantial than the increase in the minor revision number would have you think.
For example, Java 1.1 added many new library elements, redefined the way events are
handled, and reconfigured many features of the original 1.0 library.
The next major release of Java was Java 2, where the 2 indicates “second generation.”
The creation of Java 2 was a watershed event, marking the beginning of Java’s “modern
age.” The first release of Java 2 carried the version number 1.2. It may seem odd that
the first release of Java 2 used the 1.2 version number. The reason is that it originally
referred to the internal version number of the Java libraries but then was generalized to
refer to the entire release itself. With Java 2, Sun repackaged the Java product as J2SE
(Java 2 Platform Standard Edition), and the version numbers began to be applied to
that product.
The next upgrade of Java was J2SE 1.3. This version of Java was the first major upgrade
to the original Java 2 release. For the most part, it added to existing functionality and
“tightened up” the development environment. The release of J2SE 1.4 further enhanced
Java. This release contained several important new features, including chained
exceptions, channel­based I/O, and the assert keyword.
The release of J2SE 5 created nothing short of a second Java revolution. Unlike most of
the previous Java upgrades, which offered important but incremental improvements,
J2SE 5 fundamentally expanded the scope, power, and range of the language. To give
you an idea of the magnitude of the changes caused by J2SE 5, here is a list of its major
new features:

Generics

Autoboxing/unboxing

Enumerations

The enhanced “for­each” style for loop

Variable­length arguments (varargs)

Static import

Annotations


This is not a list of minor tweaks or incremental upgrades. Each item in the list
represents a significant addition to the Java language. Some, such as generics, the
enhanced for loop, and varargs, introduced new syntax elements. Others, such as
autoboxing and auto­unboxing, altered the semantics of the language. Annotations
added an entirely new dimension to programming.
The importance of these new features is reflected in the use of the version number “5.”
The next version number for Java would normally have been 1.5. However, the new
features were so significant that a shift from 1.4 to 1.5 just didn’t seem to express the
magnitude of the change. Instead, Sun elected to increase the version number to 5 as a
way of emphasizing that a major event was taking place. Thus, it was named J2SE 5,
and the Java Development Kit (JDK) was called JDK 5. In order to maintain
consistency, however, Sun decided to use 1.5 as its internal version number, which is
also referred to as the developer version number. The “5” in J2SE 5 is called the

Yüklə 83 Mb.

Dostları ilə paylaş:
1   2   3   4   5   6   7   8   9   ...   82




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©genderi.org 2024
rəhbərliyinə müraciət

    Ana səhifə