WEB开发网
开发学院WEB开发Jsp What Is Java 阅读

What Is Java

 2008-01-05 18:38:22 来源:WEB开发网   
核心提示:In this Article The java PRogramming Language The Java Platforms The Java Virtual Machine The JVM Without Java The Java Community Process

In this Article

  1. The java PRogramming Language
  2. The Java Platforms
  3. The Java Virtual Machine
  4. The JVM Without Java
  5. The Java Community Process
  6. Conclusions

We recently received an email aSKINg for a "What Is Java" entry on the O'Reilly Network What Is site. Who could possibly not know what Java is in 2006? After ten years of books, websites, and conferences, doesn't everyone know what Java is? Apparently not.

After all, things have changed.

For every dusty definition that speaks of applets and Just-In-Time compilers, there are new directions and new realities that have settled in, understood by many, yet not always completely documented. Java used to mean:

  • Applets
  • Bytecode interpretation
  • Slow performance
  • A "cargo cult" awaiting drops from Sun

Today, it means:

  • Web applications, web services, SOAs, etc.
  • Hotspot dynamic compilation
  • High-performance
  • An open source community, increasingly independent of Sun

The old slogan "Write Once, Run Anywhere" still holds true--but what's being written and where and how it's being run are changing.

The Java Programming Language

Java, the language, is a high-level object-oriented programming language, influenced in various ways by C, C++, and Smalltalk, with ideas borrowed from other languages as well (see O'Reilly's History of Programming Languages). Its syntax was designed to be familiar to those familiar with C-descended "curly brace" languages, but with arguably stronger OO principles than those found in C++, static typing of objects, and a fairly rigid system of exceptions that require every method in the call stack to either handle exceptions or declare their ability to throw them. Garbage collection is assumed, sparing the developer from having to free memory used by obsolete objects.

One of Java's more controversial aspects--widely accepted at the time of its release but increasingly criticized today--is its incomplete object-orientation. Specifically, Java primitives sUCh as int, char, boolean, etc. are not objects, and require a completely different treatment from the developer: as int is not a class, you cannot subclass and declare new methods on it, cannot pass it to a method that eXPects a generic Object, and so on. The inclusion of primitives increases Java performance, but at the arguable expense of code clarity, as anyone who's had to work with the so-called "wrapper classes" (Integer, Character, and Boolean) will attest. Java 5.0 introduces an "autoboxing" scheme to eliminate many uses of the wrapper classes, but in some ways it obscures what is really going on.


Tags:What Is Java

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接