Introduction to Java programming language
In this era of smartphones and internet, everyone starts their day with their phone. Approx everyone use their phone just after waking up in the morning. It has become a part of our life. Earlier we had to go to the market to buy something, we had to go to the bank to withdraw or transfer money , but now we can do all these things from our mobile phones just by sitting at home. Have you thought about how we get all this information from a mobile phone - all this has been possible due to a high level programming language called java. Today we will read in detail about java programming language.
What is Java programming language?Java is defined as an object oriented and multi purpose programming language. It is a high level, fast, secure, robust and reliable programming language which is designed to have less need for implementation dependencies. Java is also called a computer platform for application development because it has a runtime environment (JRE)and API.
History of Java programming languageIn June 1991, James Gosling, Patrick Naughton and Mike Sheridan initiated the project of Java programming language. James Gosling is also known as the father of Java programming language. And the team of Java members is also called green team.
The Java teams selected Oak as the name for their programming language because Oak tree represents strength. And at that time Oak tree was also selected as the national tree of various countries like USA, France, etc. But in 1995, the name Oak was replaced by "Java" because Oak technologies already had it as their trademark. Now you must be thinking by then named it Java? So here is the answer, the team come together to select new name and the suggested name in the list are like DNA, Java, silk, jolt, dynamic, revolutionary, etc. They wanted to choose something that is cool unique dynamic lively and easy to spell.
Silk and Java is the top choices of the team and as Java is unique, cool and easy to spell they decided to name it Java. In 1995, James Gosling originally released Java programming language at Sun microsystems and now it is a subsidiary of Oracle corporations.
Features of Java programming language
The syntax of Java is very simple, clean, easy to learn and easy to understand. Syntax of Java is based on C++ it becomes easier to learn Java programming language which after learning C++. It does not include many complicated features such as operator overloading and explicit pointers, etc. Java also provides the feature of automatic garbage collector.
Java provides programmer the facility to carry the bytecode in Java to different platforms. And there is no implementation required in Java programming language.
Robust symbolises strong. Java is considered as robust because it has automatic garbage collector, less security problems, less number of pointers and it also provide type checking and exception handling mechanism.
4. Object oriented programming language
Everything present in Java programming language is an object or in other words we can say that java is an object oriented programming language which means that it contains many concepts like polymorphism, inheritance, and data binding, etc. Object oriented programming language simplifies the maintenance and development of softwares.
5. High performance
The bytecode of Java are close to native codes that is why Java is faster than other interpreted programming languages but still Java is slow then some of the compiled languages like C, C++, etc.
6. Architecture neutral
Java is designed for having less requirement of implementation dependencies due to which it is architecture neutral. For example: in Java there is fixed size of primitive types.
Thread set is a separate instruction for execution of programs. Java is defined as multithreaded because at a particular time eagles with many tasks. And the advantage of of multithreading is that memory is not occupied for every thread. For web applications and multi media are very important.
8. Platform independent
Java is a platform independent programming language as it can be run anywhere just by writing quotes in Java programming language. Java is a software based platform which runs on other hardware based platforms. Quotes written in Java programming language can be run on different platforms like Linux, Mac/OS, Windows, Sun Solaris, etc. A compiler compiles the code written in Java and translates it into bytecodes. The bytecode are write once, run anywhere codes (WORA).
Java provides the facilities to the programmer to develop distributed applications that is why it it is considered as distributed. For developing distributed applications RMI and EJB are used.
It is a computer program which is used to translate high level program statement into assembly language. In other words we can say that, Java interpreter converts the bytecodes of Java into the code which can be understood by host machine.
Java is considered as a dynamic language as it supports dynamic classes loading. It also supports automatic garbage collector, dynamic compilation and function of native languages (C and C++).
Java programming language is famous for its security. Developers can create various virus-free systems with the help of Java programming language. Java is considered as a secure programming language because it runs program inside a virtual machine sandbox, there is no explicit pointer in Java and it also consist of classloader, bytecode verifier and security manager.
Types of Java platformsThere are four types of Java programming language platforms that are explained as follows:
1. Java standard edition (Java SE)
Java SE is Java programming language platform which include APIs that offer core functionality of Java programming. Some of the example of Java SE API are java.lang, java.math, java.net, java.util, java.io, and java.sql, etc. String, regex, multithreading, OOPs, AWT, networking, swing, exception, reflection, inner classes, etc. are the core topics of Java standard edition (Java SE).
2. Java enterprise edition (Java EE)
Java enterprise edition (Java EE) is an enterprise platform which include and time and an API that are mainly used for developing web and enterprise applications. These applications are highly scalable, multi tired, large scale, reliable and secure. Servlet, web services, JPA, JSP, EJB, etc. are the topics of Java EE.
3. Java micro edition (Java ME)
Java micro edition (Java ME) is a platform which is used in the development of mobile applications. It includes an API and a small footprint virtual machine on small devices to run Java programming language applications.
JavaFX is a platform that uses a lightweight user interface API for developing rich internet applications. To take the advantage of higher performance clients in Java programming language, JavaFX uses media engines and hardware accelerated graphics.
Different components of Java programming languageThere are three different types of components of Java programming language which are explained as follows:
1. Java development kit (JDK)
Java development kit (JDK) is a software development environment that is used for developing applets and Java applications. It includes JRE and development tools which are used by the Java developers on Solaris, windows, Linux and macOS. JDK helps programmer in coding and running Java programs.
Reasons for using JDK:
• It contains a interpreter, compiler, an archiver, Java application launcher, Appleviewer, a document generator, etc.
• it consists of tools and JRE to write Java programs and for execution of these programs.
• it converts codes written in Java programming language into byte code with the help of compiler.
2. Java virtual Machine (JVM)
Java virtual Machine (JVM) is an engine or a specification which provides a runtime environment to execute the Java bytecodes or applications. JVM is also able to run programs that are written in other programming languages. JVM is available in both hardware as well as the software platforms. The main task of JVM are to load code, execute code, verify code and provide runtime environment.
Reasons for using JVM:
• For the execution of Java source code it provides a platform independent way.
• it includes numerous tools, frameworks and libraries.
• with the use of JVM you can save a lot of time.
• it consists of Just in Time (JIT) compiler which translates Java source code into low level programming language.
3. Java runtime environment (JRE)
Java runtime environment (JRE) is a part of software which is developed to run other softwares. Java RTE is also used to express the term JRE. JRE consists of loader class, JVM and class libraries. In order to run a Java program, JRE is required.
Reasons for using JRE:
• It provides JVM, class libraries, loader class and other supporting files.
• important package classes are used in it like swing, math, lang, util, awt, etc.
• in order to run Java applets, JRE is required to be installed in the systems.
Uses of Java programming languageJava programming language is mainly used to create these four types of applications which are explained as follows:
1. Web applications
Web application is an application which creates a dynamic page and runs on the side of server. At present time, technologies that are used to create web application in Java programming language are Struts, Spring, Servlet, Hibernate, JSP, JSF, etc.
2. Mobile applications
Mobile application refers to application that is developed for mobile devices. At present time, platforms that are used to develop mobile applications in Java programming language are Java ME and Android.
3. Standalone applications
Desktop applications and window based applications are the other name of standalone applications. We need to install these traditional software on every machine. Media player and antivirus are the examples of these applications. At current time, for the creation of standalone applications AWT and swing are used in Java programming language.
4. Enterprise applications
Enterprise applications are those applications which are distributed in nature. Banking application is the example of enterprise applications. It gives programmer the advantage of high level security, clustering and load balancing. At present time, EJB is used in Java programming language for developing enterprise applications.
In this article we have discussed about Java programming language. Before learning Java programming language one should know the basics of Java programming language. So through this article you will able to know what is Java programming language, its features, history, uses, platforms and components. I hope up all this information will be useful to you.