Intro to JAVA
PROGRAMMING LANGUAGE
Java is a high-level, class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible. It is a general-purpose programming language intended to let programmers write
once, and run anywhere (WORA), meaning that compiled Java
code can run on all platforms that support Java without the need to
recompile. Java applications are typically compiled to bytecode that
can run on any Java virtual machine (JVM) regardless of the underlying computer architecture. The syntax of Java is similar to C and C++ but has fewer low-level facilities than either of them. The Java runtime
provides dynamic capabilities (such as reflection and runtime code modification) that are typically
not available in traditional compiled languages. As of 2019, Java was one of
the most popular
programming languages in use according to GitHub, particularly
for client–server web applications,
with a reported 9 million developers.
History
of JAVA
·
Begin with project “Green”
in 1991 founded by Patrick Naughton, Mike Sheridan & James Gosling who
worked for sun microsystems.
·
The purpose is to draft and
plan for future computer programs that can be executed on any machine.
·
Firstly it was called “Green
talk” by James Gosling and the file extension was “.gt”.
·
Then it was named “Oak
programming language” which was developed in the early 90s by sun microsystems.
·
In 1995 java was distributed
freely for testing and then the java development kit (JDK) was launched in May
1995.
·
At present, its developer is
Oracle cooperation.
Java is used for,
- Mobile applications
(especially Android apps)
- Desktop applications
- Web applications
- Web servers and application
servers
- Games
- Database connection
- And much, much more!
Why Use Java?
- Java works on different
platforms (Windows, Mac, Linux, Raspberry Pi, etc.)
- It is one of the most
popular programming languages in the world
- It has a large demand in the
current job market
- It is easy to learn and
simple to use
- It is open-source and free
- It is secure, fast, and
powerful
- It has huge community
support (tens of millions of developers)
- Java is an object oriented
language that gives a clear structure to programs and allows code to be
reused, lowering development costs
- As Java is close to C++ and C#, it
makes it easy for programmers to switch to Java or vice versa
We
mentioned about JVM and WORA in our introduction chapter. Let’s see what they
are
Java
compiler
When writing a java
programme , the first man made command file cannot be understood by a computer
but can be easily read and understood by humans therefore, those codes are
called source codes/ human readable codes.
As mentioned these
source codes cannot understand by the O/S. To read these codes by computer we
use a software named “java compiler”.
Task of the java compiler is read all commands,instructions in the source code and check errors. If there are no errors then creates a new file named “byte code file” as .class file
Java Virtual Machine (JVM)
Even if a byte code file is created as above, it is also not understandable by the computer. Therefore JVM (Java Virtual Machine) has been created for those functions.
A Java virtual machine (JVM) is
a virtual machine that enables a computer to run Java programs as well as
programs written in other languages that are also
compiled to Java byte code. The JVM is
detailed by a specification that formally describes what is required in a JVM
implementation. Having a specification ensures interoperability of Java
programs across different implementations so that program authors using
the Java Development Kit (JDK) need not worry
about idiosyncrasies of the underlying hardware platform.
Java Runtime Environment (JRE)
The Java Runtime Environment is software that java programs require to run correctly. The JRE is the underlying technology that communicates between the java programme and the operating system.
Java Write Once , Run Anywhere (WORA)
Java programmes are platform independent. Platforms means operating systems in a computer. We know the byte code file is read by the JVM and this JVM software various from computer to computer. As a result no matter what operating system is present on your computer the same byte code file will run on your computer as well. This is because of the different types of JVM that are separate for windows, mac OS , Linux etc. the JVM adopts to the command interpreter of the computer.
This added to an important feature on java
termed as portability.
An important point to noted is that while
java is platform independent language, the JVM is platform dependent. Different
JVMs designed for different OS and byte code is able to run on different OS.
Written by
Sachini Vinodya
Software Engineering Student,
(Content Writer at Learn with Panduza).
Happy learning !







Comments
Post a Comment