Introduction to Java Programming – Java Tutorial For Beginners

Introduction to Java Programming – Java tutorial for beginners. Here Coding compiler sharing a beginners tutorial on Java programming. It will help you to know about the history of Java, characteristics of Java, Java features and benefits of Java programming. Let’s start learning Java programming.

Introduction to Java Programming

Java tutorial – Introduction to Java programming. Java is a 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 version)
  • JavaEE (J2EE) (Java 2 Platform, Enterprise Edition, Java Platform Enterprise Edition)
  • JavaME (J2ME) (Java 2 Platform Micro Edition, Java platform micro version)

In June 2005, the JavaOne conference was held, and Sun Corporation announced Java SE 6. At this point, various versions of Java have been renamed to remove 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.

Main Characteristics of Java Programming

  • The Java language is simple: The syntax of the Java language is very close to the C and C++ languages, making it easy for most programmers to learn and use. On the other hand, Java discards features that are rarely used in C++ that are difficult to understand and confusing, such as operator overloading, multiple inheritance, and automatic casts. In particular, the Java language does not use pointers, but rather references. It also provides automatic waste collection, so programmers don’t have to worry about memory management.
  • The Java language is object-oriented: The Java language provides primitives such as classes, interfaces, and inheritance. For the sake of simplicity, only single inheritance between classes is supported, but multiple inheritances between interfaces are supported, and the implementation mechanism between classes and interfaces is supported (keywords implements). The Java language fully supports dynamic binding, whereas the C++ language only uses dynamic binding for virtual functions. In short, the Java language is a pure object-oriented programming language.
  • The Java language is distributed: The Java language supports the development of Internet applications. There is a web application programming interface (java net) in the basic Java application programming interface, which provides a class library for web application programming, including URL, 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, and garbage collection are important guarantees for the robustness of Java programs. Discarding pointers is a wise choice for Java. Java’s security check mechanism makes Java more robust.
  • The Java language is safe: Java is commonly used in network environments, and for this reason, Java provides a security mechanism against malicious code attacks. In addition to the many security features of the Java language, Java has a security mechanism (class ClassLoader) for classes downloaded over the network, such as assigning different namespaces to prevent substitution of local synonym classes, bytecode checking, and security management. The mechanism (class SecurityManager) lets Java applications set up security sentinels.
  • The Java language is architecture-neutral: A Java program (a file with a suffix of java) is compiled on the Java platform into an architecture-neutral bytecode format (a file with a suffix of class) and can then be run on any system that implements this Java platform. This approach is suitable for the distribution of heterogeneous network environments and software.
  • The Java language is portable: This portability comes from the 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. The Java operating environment is implemented in ANSI C.
  • The Java language is interpreted: As mentioned earlier, Java programs are compiled into a 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 these bytecodes, and the classes needed during execution are loaded into the runtime environment during the join phase.
  • Java is high performance: Java is really high performance compared to interpreted high-level scripting languages. In fact, the speed of Java is getting closer to C++ with the development of JIT (Just-In-Time) compiler technology.
  • The Java language is multithreaded: In the Java language, a thread is a special kind of object that must be created by the Thread class or its child (sun) class. There are usually two ways to create a thread: first, use a constructor that is a Thread (Runnable) to wrap an object that implements the Runnable interface into a thread, and second, derive a subclass from the Thread class and override the run. Method, the object created using this subclass is a thread. It is worth noting that the Thread class already implements the Runnable interface, so any thread has its run method, and the run method contains the code the thread is running. The activity of the thread is controlled by a set of methods. The Java language supports simultaneous execution of multiple threads and provides a synchronization mechanism between multiple threads (keyword is synchronized).
  • The Java language is dynamic: One of the design goals of the Java language is to adapt to a dynamically changing environment. The classes required by Java programs can be dynamically loaded into the runtime environment, and the required classes can be loaded over the network. This also facilitates the upgrade of the software. In addition, classes in Java have a runtime representation that can perform type checking at runtime.

Development History of Java Programming

  • May 23, 1995, the birth of the Java language
  • In January 1996, the first JDK-JDK1.0 was born.
  • In April 1996, 10 of the most important operating system vendors stated that they would embed JAVA technology in their products.
  • In September 1996, about 83,000 web pages were made using JAVA technology.
  • JDK1.1 released on February 18, 1997
  • On April 2, 1997, the JavaOne conference was held with more than 10,000 participants, setting a record for the scale of similar conferences around the world.
  • 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, JAVA2 Enterprise Platform J2EE was released.
  • In June 1999, Sun released three versions of Java: Standard Edition (JavaSE, formerly J2SE), Enterprise Edition (JavaEE was previously J2EE), and Micro Edition (JavaME, formerly J2ME)
  • May 8, 2000, JDK1.3 released
  • May 29, 2000, JDK1.4 released
  • On June 5, 2001, NOKIA announced that it will sell 100 million Java-enabled mobile phones by 2003
  • September 24, 2001, J2EE1.3 released
  • On February 26, 2002, J2SE1.4 was released, and since then Java’s computing power has been greatly improved.
  • On September 30, 2004, 18:00 PM and J2SE1.5 were released, which became another milestone in the history of Java language development. In order to indicate the importance of this version, J2SE1.5 was renamed to Java SE 5.0.
  • In June 2005, the JavaOne conference was held, and Sun Corporation announced 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 of java.
  • In November 2010, Apache threatened to withdraw from the JCP because Oracle was not friendly to the Java community.
  • On July 28, 2011, Oracle released the official version of java7.0.

Java Development Tools

The Java language tries to ensure that the system has more than 1G memory. 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 editors.
  • IDE: Eclipse

After installing the above tools, we can output Java’s first program “Hello World!”

Java Hello World Program

Public class MyFirstJavaProgram {
   Public static void main(String []args) {
      System.out.println(“Hello World”);
   }
}

In this Java tutorial, we learned about the Java programming introduction, in coming tutorials, we will learn more about the java development environment. Happy learning.!

Related Java Tutorials & Interview Questions

Related Java Tutorials & Interview Questions
Java Performance Tuning Tips 21 Aricent Java Interview Questions
Core Java Multiple Choice Questions 53 Accenture Java Interview Questions
60 Java Multiple Choice Questions And Answers 399 Core Java Interview Questions
Advanced Javascript Interview Questions 581 Advanced Java Interview Questions

 

Leave a Reply

Your email address will not be published. Required fields are marked *