Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Introduction to Java


May 10, 2021 Java


Table of contents


Introduction to Java

Java is the general term for the Java object-oriented programming language and Java platform introduced by Sun Microsystems in May 1995. 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)
  • JavaME (J2ME) (Java 2 Platform Micro Edition, Java Platform Micro Edition)

In June 2005, the JavaOne Conference was held and SUN disclosed Java SE 6. A t this point, various versions of Java have been renamed to cancel the number "2": J2EE changed its name to Java EE, J2SE changed its name to Java SE, and J2ME changed its name to Java ME.


Key features

  • The Java language is simple:

    The syntax of the Java language is very close to that of the C language and the C language, making it easy for most programmers to learn and use. J ava, on the other hand, discards rarely used, hard-to-understand, and confusing features in C+ , such as operator overloading, multi-inheritance, and automatic cast-type conversion. I n particular, the Java language does not use pointers, but references. It also provides automatic scrap collection so that programmers don't have to worry about memory management.

  • The Java language is object-oriented:

    The Java language provides pronirs such as classes, interfaces, and inheritance, and for simplicity, only single inheritance between classes is supported, but multi-inheritance between interfaces is supported, and implementation mechanisms between classes and interfaces (keywords are implements). T he Java language fully supports dynamic binding, while the C-language uses dynamic binding only for virtual functions. In summary, the Java language is a pure object-oriented programming language.

  • The Java language is distributed:

    The Java language supports the development of Internet applications, and there is a network application programming interface (java net) in the basic Java application programming interface, which provides a class library for network application programming, including URLs, URLConnection, Socket, ServerSocket, and so on. Java's RMI (Remote Method Activation) mechanism is also an important means of developing distributed applications.

  • The Java language is robust:

    Java's strong type mechanism, exception handling, automatic collection of garbage, etc. are important guarantees for the robustness of Java programs. D iscarding pointers is a smart choice for Java. Java's security checks make Java more robust.

  • The Java language is secure:

    Java is typically used in network environments, and for this reason Java provides a security mechanism against attacks by malicious code. In addition to the many security features that the Java language has, Java has a security guard mechanism (ClassLoader) for classes downloaded over the network, such as assigning different namespaces to prevent overrides of local classes of the same name, byte code checking, and providing a security management mechanism (Class SecurityManager) that lets Java applications set up security sentinels.

  • The Java language is architecturally neutral:

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

  • The Java language is portable:

    This portability stems from architectural neutrality, and Java strictly dictates the length of each base data type. The Java system itself is highly portable, the Java compiler is implemented with Java, and the Java operating environment is implemented with ANSI C.

  • The Java language is explanatory:

    As mentioned earlier, Java programs are compiled into bytecode formats on the Java platform and can then run on any system that implements the Java platform. At runtime, Java interpreters in the Java platform interpret these bytecodes, and the classes required during execution are loaded into the running environment during the join phase.

  • Java is high-performance:

    Java is indeed high-performance compared to those interpreted advanced scripting languages. In fact, Java is getting closer and closer to C with the development of just-In-Time compiler technology.

  • The Java language is multithreaded:

    In the Java language, a thread is a special object that must be created by the Thread class or its children (grandchildren) class. T here are usually two ways to create threads: one is to wrap an object that implements the Runnable interface into a thread using a constructor that is constructed as Thread, and the other is to derive sub-classes from the Thread class and override the run method, using objects created by that sub-class as threads. I t is worth noting that the Thread class has implemented the Runnable interface, so any thread has its run method, which contains the code that the thread wants to run. T he activity of a thread is controlled by a set of methods. The Java language supports simultaneous execution by multiple threads and provides a synchronization mechanism between multiple threads (keyword synchronized).

  • The Java language is dynamic:

    One of the design goals of the Java language is to adapt to dynamic environments. T he classes required by java programs can be dynamically loaded into the operating environment, or they can be loaded over the network. T his also facilitates software upgrades. In addition, classes in Java have a run-time represented and can perform type checks for run-time.


History

  • On May 23, 1995, the Java language was born
  • In January 1996, the first JDK-JDK 1.0 was born
  • In April 1996, the 10 leading operating system vendors announced that JAVA technology would be embedded in their products
  • In September 1996, some 83,000 web pages were produced using JAVA technology
  • On February 18, 1997, JDK1.1 was released
  • On 2 April 1997, the JavaOne conference was held with more than 10,000 participants, a record for the size of a conference of its kind in the world at that time
  • In September 1997, the Java Developer Connect community had more than 100,000 members
  • In February 1998, JDK1.1 was downloaded more than 2,000,000 times
  • On December 8, 1998, JAVA2 enterprise platform J2EE was released
  • In June 1999, SUN released three versions of Java: Standard (JavaSE, formerly J2SE), Enterprise (JavaEE formerly J2EE) and Micro (JavaME, formerly J2ME)
  • May 8, 2000, JDK1.3 released
  • May 29, 2000, JDK1.4 released
  • On June 5, 2001, NOKIA announced that it would sell 100 million Java-enabled handsets by 2003
  • On September 24, 2001, J2EE1.3 was released
  • Since the release of J2SE1.4 on February 26, 2002, Java's computing power has improved significantly
  • On September 30, 2004, at 18:00 PM, J2SE 1.5 was released, which became another milestone in the history of Java language development. To indicate the importance of this release, J2SE 1.5 was renamed Java SE 5.0
  • In June 2005, the JavaOne Conference was held and SUN disclosed Java SE 6. At this point, various versions of Java have been renamed to cancel the number "2": J2EE changed its name to Java EE, J2SE changed its name to Java SE, and J2ME changed its name to Java ME
  • In December 2006, SUN released JRE6.0
  • On April 20, 2009, Oracle acquired Sun for $7.4 billion. Get the copyright to java.
  • In November 2010, Apache threatened to quit JCP because of Oracle's unkindness to the Java community.
  • On July 28, 2011, Oracle released the official version of java 7.0.
  • On March 18, 2014, Oracle released Java SE 8.
  • On September 21, 2017, Oracle corporation released Java SE 9
  • On March 21, 2018, Oracle corporation released Java SE 10
  • Java SE 11 was released on September 25, 2018
  • Java SE 12 was released on March 20, 2019


Java development tools

The Java language tries to ensure that the system has more than 1G of memory, and the 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

Once the above tools are installed, we can output Java's first program, Hello World! "

public class MyFirstJavaProgram {

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

In the next section we'll show you how to configure the java development environment.