Latest web development tutorials

Introduction to Java

Java was developed by Sun Microsystems company in May 1995 to launch the Java object-oriented programming language and the Java platform in general. Jointly developed by James Gosling and colleagues, and in 1995 officially launched.

Java is divided into three systems:

  • JavaSE (J2SE) (Java2 Platform Standard Edition, java Platform, Standard Edition)
  • JavaEE (J2EE) (Java 2 Platform, Enterprise Edition, java Platform, Enterprise Edition)
  • JavaME (J2ME) (Java 2 Platform Micro Edition, java Platform, Micro Edition).

June 2005, JavaOne Conference held, SUN publicly Java SE 6. At this time, various versions of Java which has been renamed to cancel the number "2": J2EE renamed Java EE, J2SE renamed Java SE, J2ME renamed Java ME.


Key Features

  • Java language is simple:

    Java language syntax of C and C ++ language is very close, so that most programmers are easy to learn and use. On the other hand, Java discarded rarely used in C ++, it is difficult to understand, confusing those features, such as operator overloading, multiple inheritance, automatic type coercion. In particular, Java language does not use pointers, but the reference. And it provides automatic garbage collection, so programmers do not have to worry about memory management.

  • Java language is object-oriented:

    Java language provides classes, interfaces and inheritance primitives, for simplicity, only supports single inheritance between classes, but support multiple inheritance between interfaces, and supports the implementation mechanism between the classes and interfaces (keyword implements) . Java language fully supports dynamic binding, while the C ++ language only virtual functions use dynamic binding. In short, Java language is a pure object-oriented programming language.

  • Java language is distributed:

    Java language support for Internet development and application, there is a network application programming interface (java net) in the basic Java application programming interface, which provides a library for web application programming, including the URL, URLConnection, Socket, ServerSocket like. Java's RMI (remote method activation) mechanism is an important means to develop distributed applications.

  • Java is a robust language:

    Java's strong typing, exception handling, automatic garbage collection and other Java programs is an important guarantee robustness. Java is a pointer drop wise choice. Java security checking mechanism makes Java more robust.

  • Java language is safe:

    Java is often used in a network environment, therefore, Java provides a safety mechanism to prevent malicious code attacks. In addition to the many security features of the Java language has, through the network to download the Java class has a security mechanism (class ClassLoader), such as assigning different namespaces to prevent displacement of the native class of the same name, byte code inspection, and provide security management mechanism (class SecurityManager) allows Java applications to set the security guard.

  • Java is a language-neutral architecture:

    Java program (suffix java files) on the Java platform are compiled into architecture-neutral bytecode format (suffix class files), then the system can run on any Java platform to achieve this. This approach is suitable for distributed heterogeneous network environment and software.

  • Java language is portable:

    This portability comes from the architecture neutrality, in addition, Java also strict requirements of the various types of basic data length. Java system itself is also very portable, Java compiler is implemented in Java, Java runtime environment is implemented in ANSI C.

  • Java language is interpreted:

    As mentioned earlier, Java programs on the Java platform are compiled into bytecode format, then this can be achieved in any system running the Java platform. At runtime, Java platform Java byte code interpreter interprets these implementation class implementation process required in the coupling phase is loaded into the runtime environment.

  • Java is a high-performance:

    Compared with those high-level scripting language interpreted, Java is indeed a high performance. In fact, Java's speed with the development of JIT (Just-In-Time) compiler technology is increasingly closer to C ++.

  • Java is a multithreaded language:

    In the Java language, the thread is a special object, it must be created by the Thread class or sub (Sun) class. There are generally two ways to create threads: First, use type structure as Thread (Runnable) constructors will be an object that implements Runnable interface packaged into a thread, and the second, from the Thread class derived subclass and override run the method of using an object of the subclass is created thread. It is worth noting that the Thread class already implements the Runnable interface, so any one thread has its run method, and the run method contains the code thread to run. Thread activity by a set of methods to control. Java language support simultaneous execution of multiple threads, and provides synchronization mechanism (keyword synchronized) multi-threads.

  • Java language is dynamic:

    One of the design goals of Java is to adapt to the dynamic environment. Class Java program needs can be dynamically loaded into the operating environment to be needed to load the class via the network. It is also helpful for upgrading software. In addition, Java class in a run-time representation, capable run-time type checking.


Development History

  • May 23, 1995, Java language was born
  • January 1996, the first birth of a JDK-JDK1.0
  • April 1996, 10 main operating system vendor declaration embed JAVA technology in their products
  • In September 1996, about 83,000 Web pages utilize JAVA technology to produce
  • February 18, 1997, JDK1.1 release
  • April 2, 1997, JavaOne Conference, more than a thousand participants, a record at the time scale of the global similar meeting
  • September 1997, JavaDeveloperConnection community members over one hundred thousand
  • February 1998, JDK1.1 has been downloaded more than 2,000,000 times
  • December 8, 1998, JAVA2 J2EE enterprise platform release
  • June 1999, SUN Java released three versions: Standard Edition (JavaSE, formerly J2SE), Enterprise Edition (JavaEE formerly J2EE) and Micro Edition (JavaME, formerly J2ME)
  • 2000 May 8, JDK1.3 release
  • 2000 May 29, JDK1.4 release
  • June 5, 2001, NOKIA announced that by 2003, will sell 100 million Java-enabled mobile phone
  • September 24, 2001, J2EE1.3 release
  • February 26, 2002, J2SE1.4 release, since Java computing power has increased dramatically
  • 2004 Nian Yue 30 Ri 18:00 PM,J2SE1.5. 9 release, the Java language has become another milestone in the history of the development. To illustrate the importance of the release, said, J2SE1.5 renamed Java SE 5.0
  • June 2005, JavaOne Conference held, SUN publicly Java SE 6. At this time, various versions of Java has been renamed to cancel one of the figures "2": J2EE renamed Java EE, J2SE renamed Java SE, J2ME renamed Java ME
  • In December 2006, SUN released JRE6.0
  • April 20, 2009, Oracle's $ 7.4 billion acquisition of Sun. Get java copyright.
  • November 2010, due to the Oracle Java community unfriendly, so Apache threatened to quit JCP [4].
  • July 28, 2011, Oracle released the official version of java7.0.

Java Development Tools

Java language try to ensure that more than 1G system memory, other tools are as follows:

  • Linux systems or Windows 95/98/2000 / XP, WIN 7/8 system
  • Java JDK 7
  • Notepad editor or another editor.
  • IDE: Eclipse

After installing the above tools, we can output Java first program "Hello World!"

public class HelloWorld {
    public static void main(String []args) {
       System.out.println("Hello World");
    }
} 

In the next chapter we will describe how to configure the java development environment.