Let's write program with Java - (Part 0)
Credit: Analytics Insight

Let's write program with Java - (Part 0)

What is Java and its brief history:

Java is a programming language which is use to write computer program. It is an object oriented programming (OOP) language means it supports all the OOP concepts. Its syntax is lot similar to the other popular languages like C, C++ and C#.

Java was developed at Sun Microsystem (which is now subsidiary of Oracle) in year 1995 by James Gosling and his team. At first its name was Oak and after changed to Java. The most important thing about Java is that program written in Java is platform independent means it can run any platform whatever it is windows, linux or Mac.

Java Platforms / Editions:

There are 4 platforms or editions of Java:

1. Java SE (Java Standard Edition)

It is a Java programming platform. It includes Java programming APIs such as java.lang, java.io, java.net, java.util, java.sql, java.math etc. It includes core topics like OOPs, String, Regex, Exception, Inner classes, Multithreading, I/O Stream, Networking, AWT, Swing, Reflection, Collection, etc.

2. Java EE (Java Enterprise Edition)

It is an enterprise platform that is mainly used to develop web and enterprise applications. It is built on top of the Java SE platform. It includes topics like Servlet, JSP, Web Services, EJB, JPA, etc.

3) Java ME (Java Micro Edition)

It is a micro platform that is dedicated to mobile applications.

4) JavaFX

It is used to develop rich internet applications. It uses a lightweight user interface API.

When anyone talked about only Java basically they refers to the standard edition (SE). And Java SE is the base of all others.

Java SE versions:

From year 1995 to year 2023 Java release almost 20 major version release. Java SE 20 is the latest one. And Java SE 17 is the latest LTS version of Java till today.

Types of Java applications:

Almost every type of applications can be build using Java. Some of them are:

  1. Desktop application,
  2. Web application,
  3. Enterprise application,
  4. Mobile application,
  5. Embedded System etc.
No alt text provided for this image
Credit: JavaTPoint

Features:

  1. Simple
  2. Object Oriented
  3. Portable
  4. Platform Independent
  5. Secured
  6. Robust
  7. Architecture neutral
  8. Interpreted
  9. High Performance
  10. Multithreaded
  11. Distributed
  12. Dynamic
No alt text provided for this image

Executional process of Java program:

Java program execution is being done in 2 phases, Compile time and Run time.

???????? 1: Write code in JAVA.

???????? 2: Compile the JAVA code and then the compiler starts checking for errors like syntax, compilation, runtime, memory overflow etc. If compilation becomes successful then it generates .class files.

???????? 3: Convert the code into bytecode (.class files collection).

???????? 4: Load the bytecode into java virtual machine (JVM).

???????? 5: Convert the bytecode into machine code using the JVM and this process complex in 3 steps of class loader, bytecode verifier and just in time compilation (JIT).

???????? 6: After step 5 our code compiles to a machine code called binary executables.

Important Java Terminology:

Java Development Kit (JDK): The JDK is a software development environment that provides the tools and libraries necessary for developing and running Java applications. The JDK includes the Java Runtime Environment (JRE), which is necessary for running Java applications, as well as development tools such as the Java compiler (javac), the Java Archive tool (jar), and the Java debugger (jdb).

Java Virtual Machine (JVM): It is an abstract machine that provides a consistent runtime environment for Java programs to execute, while also providing important features such as memory management, garbage collection, and a security model that helps protect Java programs from malicious code.

Java Runtime Environment (JRE): It is a software package that provides the minimum set of tools and libraries required to run Java applications, including the JVM and a set of core libraries and APIs. It is designed for end-users who only need to run Java applications and is typically included as part of the installation package for Java applications.

Byte Code: IT is the compiled form of Java source code that is executed by the Java Virtual Machine (JVM). It is a highly optimized set of instructions that can be executed on any platform that has a compatible JVM installed, making Java a platform-independent programming language.


To Be Continued ...

要查看或添加评论,请登录

Saiful Islam Rasel的更多文章

社区洞察

其他会员也浏览了