Java Getting Started tutorial (Java Introduction)

What is the Java language

Java was introduced by Sun Microsystems in 1995, an object-oriented programming language. 2010, Oracle's acquisition of Sun Microsystems, after responsible for maintaining and upgrading Java version by Oracle Corporation.

Java platform (, JVM Java Virtual Machine) and Java application programming interfaces (Application Programming Interface, API) consists of the Java virtual machine. For this purpose a Java application programming interface provides a standard operating system-independent interfaces, it can be divided into the basic part and the extension part. After installing a Java platform on the hardware or operating system platform, Java applications can run.

Java3 a system that Java SE, Java EE and Java ME.

1.Java SE

Java SE (Java Platform Standard Edition, Java Platform, Standard Edition), formerly known as J2SE, which allows to develop and deploy Java applications on the desktop, server, embedded environments and real-time environment. Java SE includes support for Java Web services development class, and provide the basis for Java EE, such as the Java language foundation, JDBC operations, I / O operations, network communications and multi-threading technology. Figure 1 shows the architecture of the Java SE.

2. Java EE

Java EE (Java Platform Enterprise Edition, Java Platform, Enterprise Edition), formerly known as J2EE. Enterprise Edition to help develop and deploy portable, robust, scalable, and secure server-side Java applications. Java EE is built on the basis of Java SE, which provides Web services, component model, management and communication API, can be used to achieve enterprise-class service-oriented architecture (Service Oriented Architecture, SOA) and Web 2.0 applications.

3. Java ME

Java ME (Java Platform Micro Edition, Java Platform, Micro Edition), formerly known as J2ME, also known as K-JAVA. Java ME provides a robust and flexible environment for applications running on mobile and embedded devices (such as mobile phones, PDA, TV set-top boxes, and printers).

Java language features

1. Object Oriented

Java is an object-oriented language, its object classes, objects, inheritance, encapsulation, polymorphism, interfaces are well supported, and other packages. For simplicity, Java supports only single inheritance between classes, but you can use the interface to achieve multiple inheritance. Using the Java language development program, we need a program object-oriented design thinking and writing code.

2. platform independence

Java is "write once (Write Once, Run any Where)" language, so a program written in the Java language has good portability, and ensure that the mechanism is the Java virtual machine. Following the introduction of the virtual machine, Java language running on different platforms without recompiling.

Java language using the Java Virtual Machine shielding mechanisms relevant information specific platform, making the Java language compiler generates object code only of the program on the virtual machine, it can run without modification on multiple platforms.

3. Simplicity

The syntax for C and C ++ language is very similar to the Java language that many programmers very easy to learn. For Java, it abandoned many of the features in C ++ difficult to understand, such as operator overloading and multiple inheritance, etc., but the Java language does not use pointers, adding garbage collection, programmers need to solve the problem of memory management, make programming easier.

4. interpreted

Java programs in the Java platform runtime will be compiled into bytecode files can then be run on the operating system Java environment. When run files, Java interpreter to interpret the byte code execution, execution needs to add the class is loaded into the execution environment in the connection phase.

5. Multithreading

Java language is multi-threaded, which is also a major feature of the Java language, it must be created by the Thread class and its subclasses. Java support multiple threads execute simultaneously, and provides a synchronization mechanism between multiple threads. Any thread has its own run () method, the method to execute written on the run () method in vivo.

6. Distributed

Java language to support the development of Internet applications in Java's basic application programming interfaces there is a network application programming interface, which provides network application programming libraries, including the URL, URLConnection, Socket and so on. RIM is also an important mechanism of Java distributed application development tools.

7. robustness

Java's strong typing, exception handling, garbage collection, etc. are important to ensure the robustness of Java. Discard pointer is Java's a big step forward. In addition, Java's exception mechanism is also reflected in the robustness of a major.

8. High Performance

Java performance is mainly relative to other high-level scripting language, and with the development of JIT (Just in Time), the Java run faster also increasing.

9. Security

Java is often used in a network environment, for which, Java provides a safety mechanism to prevent malicious code. In addition to the Java language has many security features outside, Java also adds a security mechanism through the network to download the class, assign different namespaces to prevent displacement of the native class of the same name, and includes security management mechanism.

Guess you like

Origin www.cnblogs.com/lilinfeng/p/10965586.html