Introduction to Java Programming Language
In this article, I am going to give you a brief introduction to Java Programming Language. Now a day’s java technology is everywhere but what exactly is it? At the end of this article, you will understand how java technology is both a programming language and a platform and provide an overview that what this technology can do for us. So, as part of this article, we are going to discuss the following important points.
- Why java comes to the market?
- What is exactly java?
- What this technology can do for us?
- What is a standalone application?
- What is an enterprise application?
- What is the device application?
- What is a platform?
- What is Platform Dependent and Platform Independent?
- What is Byte Code?
- What is the difference between byte code and machine code?
- Java History
- Who is the Father of Java?
- Why the name Oak rename Java?
Why java comes to the market?
Java programming language mainly designed to overcome the disadvantages of c and C++ and to develop internet applications by achieving platform independence.
What is exactly java?
Java is a technology that provides two things
- Programming language(JSE/core java)
- Platform (JVM)
By using the language we can develop java applications and also provides a runtime environment (JVM) where we execute java programs.
What this technology can do for us?
As we know java comes in three different editions which allows us to develop three different types of applications, the three different editions are
- JSE (java standard edition)
- JEE (java enterprise edition)
- JME (java micro edition)
These three different types of editions allow us to develop three different types of applications. They are as follows
- Standalone/Desktop application
- Enterprise / Distributed / Internet application
- Device application
What is a standalone application?
An application installed in one system that can be executed from the same system but can’t be executed from another system is called a standalone application. The application developed for the context of one client is called a standalone application. JSE is used for developing standalone applications.
What is an enterprise application?
An application whose resources are shared among multiple clients is called distributed/ enterprise application. All internet applications are called distributed applications. These applications are present in the server system. JEE is used for developing internet applications.
There are two types of internet applications, such as
- Web supportive application
- Web application
An application that resides in the server system and that is downloaded and executed on the client computer by network call is called a web supportive application. An application that resides in the server system and that is executed directly in the server system via network call and send the response back to the client system is called a web application.
What is the device application?
JME means java mobile/micro edition. JME is used for developing device applications, such as mobile games tablets. JME is used for developing software for consumer electronics devices means embedded systems like mobile, it is popular for developing mobile gaming applications, a fully automated washing machine, robot.
What is a platform?
A platform is an environment where we execute something. A platform is a hardware or software environment where a program runs. For example, a computer platform is( OS+ hardware devices)
What is Platform Dependent?
The programs or applications complied on one platform (operating system) can be executed on the same type of operating systems but cannot be executed on other types of operating systems is called platform-independent applications.
The programming languages which are used to develop such type of applications are called platform dependent programming language. C, C++ is called a platform-dependent programming language, because when C, C++ programs have complied, C, C++ compiler generates machine codes that are specific to the operating system.
Drawbacks: We need to develop the same application multiple times which increases the development cost and time.
Solution: Need to develop platform Independent application.
If the applications complied code is able to run on different types of OS irrespective of the OS where it is compiled then such applications are called platform-independent applications.
The programming language which is used for developing such type of applications known as the platform-independent programming language.
Java is a platform-independent programming language because java program compiled code can execute (run) on any OS.
In this case, when the source code is compiled, the compiler generates intermediate code (byte code) rather than machine code, which is not specific to any OS. The intermediate code can be carried and executed on any machine provided software called JVM which is responsible for converting intermediate code into machine code
What is Byte Code?
Java programs compiled code is called byte code. When the java code is compiled java compiler (javac) generates byte code (intermediate code).
- Byte code is an intermediate language (IL) code.
- Byte code is a virtual machine code.
- Byte code is a platform-independent code.
- Byte code is the collections of mnemonics (MOVE, LOAD, ADD ETC), these byte codes are only understood by JVM.
- Every byte code occupies 1 byte.
What is the difference between byte code and machine code in Java?
Explain the java virtual machine?
JVM stands for java virtual machine. It is software provided by java to run java programs or applications. JVM is a software that is developed using c and C++ language, so JVM is platform-dependent software. JVM provides a translator, which converts byte code to native code or machine code. JVM provides two translators such as
- JIT compiler (just-in-time compiler)
Translators are used to translating the program from source program to machine language. That is understood by the machine. JIT is used specifically when we want to execute the code repeatedly means used basically for looping.
JVM for windows translates the byte code into windows specific machine code and similarly JVM for Linux translate the byte code into Linux-specific machine code. That means JVM varies from OS to OS.
JAVA history means who developed java, when developed java and why developed java. Java was developed in 1991 by James gosling of Sun Microsystems. Initially called OAK. Its name was changed to java because there was already a language called Oak.
The original motivation of java is the need for platform-independent language that could be embedded with various consumer electronics products like toasters and refrigerators, etc.
Who is the father of java?
James Gosling (PGD, born may 19, 1955near Calgary, Alberta, Canada) along with other engineer scientists discovered at sun Microsystems. He is a famous software developer, best known as the father of the java programming language.
Why the name OAK renamed to java?
They were unable to register this programming language with oak because already some other product is registered with the same name. So they renamed it to java.
So, finally What is Java?
JAVA is an Object-Oriented programming language. It is a cross-platform and multi-purpose programming language developed by SUN MICROSYSTEMS in 1991, later acquired by ORACLE Corporation. It was developed by JAMES GOSLING and PATRICK NAUGHTON. It was developed to be a machine-independent web technology. The target of Java is to write a program once and then run this program on multiple Operating Systems. It is a simple programming language. Writing, Compiling, and Debugging a program is easy in Java. It helps to create modular programs and reusable codes. It was based on C and C++ syntax to make it easy for programmers from those communities to learn. Since then, it has earned a prominent place in the World of Programming Languages.
In the next article, I am going to discuss Java Features in detail or you can say why Java Becomes so much popular. Here, in this article, I try to give an overview of the Introduction to Java Programming Language. I hope you enjoy this Introduction to Java Programming Language article.