• Complain

David Flanagan - Java in a Nutshell, 6th Edition

Here you can read online David Flanagan - Java in a Nutshell, 6th Edition full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2014, publisher: O’Reilly Media, Inc., genre: Home and family. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

David Flanagan Java in a Nutshell, 6th Edition

Java in a Nutshell, 6th Edition: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Java in a Nutshell, 6th Edition" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

The latest edition of Java in a Nutshell is designed to help experienced Java programmers get the most out of Java 7 and 8, but its also a learning path for new developers. Chock full of examples that demonstrate how to take complete advantage of modern Java APIs and development best practices, this thoroughly updated book provides a fast-paced, no-fluff introduction to the Java programming language and the core runtime aspects of the Java platform.

David Flanagan: author's other books


Who wrote Java in a Nutshell, 6th Edition? Find out the surname, the name of the author of the book and a list of all author's works by series.

Java in a Nutshell, 6th Edition — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Java in a Nutshell, 6th Edition" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Chapter 1. Introduction to the Java Environment

Welcome to Java 8. We may be welcoming you back. You may be coming to this ecosystem from another language, or maybe this is your first programming language. Whatever road you may have traveled to get here: welcome. Were glad youve arrived.

Java is a powerful, general-purpose programming environment. It is one of the most widely used programming languages in the world, and has been exceptionally successful in business and enterprise computing.

In this chapter, well set the scene by describing the Java language (which programmers write their applications in), the Java Virtual Machine (which executes those applications), and the Java ecosystem (which provides a lot of the value of the programming environment to development teams).

Well briefly cover the history of the Java language and virtual machine, before moving on to discuss the lifecycle of a Java program and clear up some common questions about the differences between Java and other environments.

At the end of the chapter, well introduce Java security, and discuss some of the aspects of Java which relate to secure coding.

The Language, the JVM, and the Ecosystem

The Java programming environment has been around since the late 1990s. It comprises the Java language, and the supporting runtime, otherwise known as the Java Virtual Machine (JVM).

At the time that Java was initially developed, this split was considered novel, but recent trends in software development have made it more commonplace. Notably, Microsofts .NET environment, announced a few years after Java, adopted a very similar approach to platform architecture.

One important difference between Microsofts .NET platform and Java is that Java was always conceived as a relatively open ecosystem of multiple vendors. Throughout Javas history, these vendors both cooperated and competed on aspects of Java technology.

One of the main reasons for the success of Java is that this ecosystem is a standardized environment. This means there are specifications for the technologies that comprise the environment. These standards give the developer and consumer confidence that the technology will be compatible with other components, even if they come from a different technology vendor.

The current steward of Java is Oracle Corporation (who acquired Sun Microsystems , the originator of Java). Other corporations, such as Red Hat, IBM, Hewlett-Packard, SAP, Apple, and Fujitsu are also heavily involved in producing implementations of standardized Java technologies.

There is also an open source version of Java, called OpenJDK, which many of these companies collaborate on.

Java actually comprises several different, but related environments and specificationsJava Mobile Edition (Java ME), Java Standard Edition (Java SE), and Java Enterprise Edition (Java EE). In this book, well only cover Java SE, version 8.

We will have more to say about standardization later, so lets move on to discuss the Java language and JVM as separate, but related concepts.

What Is the Java Language?

Java programs are written as source code in the Java language. This is a human-readable programming language, which is class based and object oriented. It is considered to be relatively easy to read and write (if occasionally a bit verbose).

Java is intended to be easy to learn and to teach. It builds on industry experience with languages like C++ and tries to remove complex features as well as preserving what works from previous programming languages.

Overall, Java is intended to provide a stable, solid base for companies to develop business-critical applications.

As a programming language, it has a relatively conservative design and a slow rate of change. These properties are a conscious attempt to serve the goal of protecting the investment that businesses have made in Java technology.

The language has undergone gradual revision (but no complete rewrites) since its inception in 1996. This does mean that some of Javas original design choices, which were expedient in the late 1990s, are still affecting the language todaysee Chapters for more details.

Java 8 has added the most radical changes seen in the language for almost a decade (some would say since the birth of Java). Features like lambda expressions and the overhaul of the core Collections code will change forever the way that most Java developers write code.

The Java language is governed by the Java Language Specification (JLS), which defines how a conforming implementation must behave.

What Is the JVM?

The JVM is a program that provides the runtime environment necessary for Java programs to execute. Java programs cannot run unless there is a JVM available for the appropriate hardware and OS platform we wish to execute on.

Fortunately, the JVM has been ported to run on a large number of environmentsanything from a set-top box or Blu-ray player to a huge mainframe will probably have a JVM available for it.

Java programs are typically started by a command line, such as:

java<arguments><programname>

This brings up the JVM as an operating system process that provides the Java runtime environment, and then executes our program in the context of the freshly started (and empty) virtual machine.

It is important to understand that when the JVM takes in a Java program for execution, the program is not provided as Java language source code. Instead, the Java language source must have been converted (or compiled) into a form known as Java bytecode. Java bytecode must be supplied to the JVM in a format called class fileswhich always have a .class extension.

The JVM is an interpreter for the bytecode form of the programit steps through one bytecode instruction at a time. However, you should also be aware that both the JVM and the user program are capable of spawning additional threads of execution, so that a user program may have many different functions running simultenously.

The design of the JVM built on many years of experience with earlier programming environments, notably C and C++ , so we can think of it as having several different goalswhich are all intended to make life easier for the programmer:

  • Comprise a container for application code to run inside
  • Provide a secure execution environment as compared to C/C++
  • Take memory management out of the hands of developers
  • Provide a cross-platform execution environment

These objectives are often mentioned together when discussing the platform.

Weve already mentioned the first of these goals, when we discussed the JVM and its bytecode interpreterit functions as the container for application code.

Well discuss the second and third goals in , when we talk about how the Java environment deals with memory management.

The fourth goal, sometimes called write once, run anywhere (WORA), is the property that Java class files can be moved from one execution platform to another, and they will run unaltered provided a JVM is available.

This means that a Java program can be developed (and converted to class files) on an Apple Mac machine running OS X, and then the class files can be moved to Linux or Microsoft Windows (or other platforms) and the Java program will run without any further work needed.

Note
The Java environment has been very widely ported, including to platforms that are very different from mainstream platforms like Linux, Mac, and Windows. In this book, we use the phrase most implementations to indicate those platforms that the majority of developers are likely to encounter. Mac, Windows, Linux, Solaris, BSD Unix, AIX, and the like are all considered mainstream platforms and count within most implementations.
Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Java in a Nutshell, 6th Edition»

Look at similar books to Java in a Nutshell, 6th Edition. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Java in a Nutshell, 6th Edition»

Discussion, reviews of the book Java in a Nutshell, 6th Edition and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.