Home> Java> javaTutorial> body text

[java tutorial] Introduction to Java

黄舟
Release: 2016-12-26 11:08:12
Original
1288 people have browsed it

Java Introduction

Java is the general name for the Java object-oriented programming language and Java platform launched by Sun Microsystems in May 1995. It was jointly developed by James Gosling and colleagues and officially launched in 1995.

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).

In June 2005, the JavaOne conference was held, and SUN released Java SE 6. At this time, various versions of Java had been renamed to remove the number "2": J2EE was renamed Java EE, J2SE was renamed Java SE, and J2ME was renamed Java ME.

Main features

Java language is simple:

The syntax of Java language is very close to C language and C++ language, making it easy for most programmers to learn and use. On the other hand, Java discards those features of C++ that are rarely used, difficult to understand, and confusing, such as operator overloading, multiple inheritance, and automatic casts. In particular, the Java language does not use pointers, but references. It also provides automatic waste collection so that programmers don't have to worry about memory management.

Java language is object-oriented:

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

Java language is distributed:

Java language supports the development of Internet applications. Among the basic Java application programming interfaces, there is a network application programming interface (java net), which provides users with Class libraries for network application programming, including URL, URLConnection, Socket, ServerSocket, etc. Java's RMI (Remote Method Activation) mechanism is also an important means of developing distributed applications.

The Java language is robust:

Java's strong typing mechanism, exception handling, automatic garbage collection, etc. are important guarantees for the robustness of Java programs. Discarding pointers is a smart choice for Java. Java's security checking mechanism makes Java more robust.

The Java language is safe:

Java is usually used in a network environment. For this reason, Java provides a security mechanism to prevent malicious code attacks. In addition to the many security features of the Java language, Java has a security prevention mechanism (class ClassLoader) for classes downloaded through the network, such as allocating different name spaces to prevent replacement of local classes of the same name, byte code inspection, and providing security management Mechanism (class SecurityManager) allows Java applications to set up security sentries.

The Java language is architecture-neutral:

Java programs (files with the suffix java) are compiled into an architecture-neutral bytecode format (files with the suffix class) on the Java platform ), which can then run on any system that implements this Java platform. This approach is suitable for heterogeneous network environments and software distribution.

The Java language is portable:

This portability comes from architecture neutrality. In addition, Java also strictly stipulates the length of each basic data type. The Java system itself is also highly portable. The Java compiler is implemented in Java, and the Java running environment is implemented in ANSI C.

The Java language is interpreted:

As mentioned above, Java programs are compiled into bytecode format on the Java platform and can then be run on any system that implements this Java platform . At runtime, the Java interpreter in the Java platform interprets and executes these bytecodes, and the classes required during the execution are loaded into the running environment during the connection phase.

Java is high-performance:

Compared with those interpreted high-level scripting languages, Java is indeed high-performance. In fact, the running speed of Java is getting closer and closer to that of C++ with the development of JIT (Just-In-Time) compiler technology.

The Java language is multi-threaded:

In the Java language, a thread is a special object that must be created by the Thread class or its descendants (grandchildren). There are usually two ways to create a thread: first, use the constructor of type Thread(Runnable) to wrap an object that implements the Runnable interface into a thread; second, derive a subclass from the Thread class and override run Method, the object created using this subclass is a thread. It is worth noting that the Thread class has implemented the Runnable interface, so any thread has its run method, and the run method contains the code to be run by the thread. The activity of a thread is controlled by a set of methods. The Java language supports the simultaneous execution of multiple threads and provides a synchronization mechanism between multiple threads (the keyword is synchronized).

The Java language is dynamic:

One of the design goals of the Java language is to adapt to dynamically changing environments. The classes required by Java programs can be dynamically loaded into the running environment, or the required classes can be loaded through the network. This also facilitates software upgrades. In addition, classes in Java have a run-time representation and can perform run-time type checking.

Development History

On May 23, 1995, the Java language was born

In January 1996, the first JDK-JDK1.0 was born

In April 1996, the 10 major operating system vendors stated that they would embed JAVA technology in their products

In September 1996, approximately 83,000 web pages were created using JAVA technology

On February 18, 1997, JDK1.1 was released

On April 2, 1997, the JavaOne conference was held, with more than 10,000 participants, setting a record for the scale of similar conferences in the world at that time

In September 1997, the JavaDeveloperConnection community had more than 100,000 members

In February 1998, JDK1.1 was downloaded more than 2,000,000 times

On December 8, 1998, the JAVA2 enterprise platform J2EE was released

In June 1999, SUN released three versions of Java: Standard Edition (JavaSE, formerly J2SE), Enterprise Edition (JavaEE formerly J2EE) and Micro Edition (JavaME, formerly J2ME)

On May 8, 2000, JDK1.3 was released

On May 29, 2000, JDK1.4 was released

On June 5, 2001, NOKIA announced that by 2003, it would 100 million Java-enabled mobile phones sold

On September 24, 2001, J2EE1.3 was released

On February 26, 2002, J2SE1.4 was released. Since then, Java’s computing power has A significant improvement

At 18:00PM on September 30, 2004, J2SE1.5 was released, becoming another milestone in the history of Java language development. In order to express the importance of this version, J2SE1.5 was renamed Java SE 5.0

In June 2005, the JavaOne conference was held, and SUN released Java SE 6. At this time, various versions of Java have been renamed to cancel the number "2": J2EE was renamed Java EE, J2SE was renamed Java SE, and J2ME was renamed Java ME

In December 2006, SUN Corporation Released JRE6.0

On April 20, 2009, Oracle acquired Sun for US$7.4 billion. Obtain the copyright of java.

In November 2010, because Oracle was unfriendly to the Java community, Apache threatened to withdraw from JCP[4].

On July 28, 2011, Oracle released the official version of java7.0.

Java Development Tools

Java language try to ensure that the system memory is above 1G. Other tools are as follows:

Linux system or Windows 95/98/2000/XP, WIN 7/8 system

Java JDK 7

Notepad editor or other editor.

IDE: Eclipse

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

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

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

The above is the content of [java tutorial] Java introduction. For more related content, please pay attention to the PHP Chinese website (m.sbmmt.com)!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!