This is just an introduction to Java and it would be great if the target audience is familiar with some of the procedural languages like C.
What is Java?
Java is a programming language and also a platform(JRE).
Java is an object-oriented, class-based, high level, robust, concurrent, secured, and general-purpose computer-programming language. It is a widely used robust technology.
James Gosling, Mike Sheridan, and Patrick Naughton initiated the Java language project in June 1991. Java was originally designed for interactive television, but it was too advanced for the digital cable television industry at the time. Initially, the language was called Oak after an oak tree that stood outside Gosling’s office. Later the project went by the name Green and was finally renamed Java, from Java coffee, the coffee from Indonesia. Gosling designed Java with a C/C++-style syntax that system and application programmers would find familiar.
Finally, Java was developed by Sun Microsystems (which is now the subsidiary of Oracle) in the year 1995.
James Gosling is known as the father of Java.
Java follows the rule of write once, run anywhere (WORA), meaning that compiled Java code can run on all platforms that support Java without the need for recompilation. 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 it has fewer low-level facilities than either of them. Java is one of the most popular programming languages in use according to GitHub, particularly for client-server web applications, with a reported 9 million developers.
What is a Platform?
Any hardware or software environment, in which a program runs is known as a platform. Since Java has a runtime environment (JRE) and API, it is called a platform.
General uses where we can find out it’s usage:
- Mobile applications (especially Android apps)
- Desktop applications
- Web applications
- Web servers and application servers
- Database connection
Why Java is used so extensively?
- Java works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc.) as it is platform-independent because it uses JVM.
- It is one of the most popular programming languages in the world
- It is easy to learn and simple to use
- It is open-source and free
- It is secure, fast and powerful
- As Java is close to C++ and C#, it makes it easy for programmers to switch to Java or vice versa
Types of Java Applications
There are generally four types of applications that can be created with the help of Java programming:
1) Stand-alone Application
Standalone applications are also known as desktop applications or window-based applications. These are traditional software that we need to install on every machine. Examples of standalone applications are Media player, Antivirus, etc. AWT and Swing are used in Java for creating standalone applications.
2) Web Application
An application that runs on the server-side and creates a dynamic page is called a web application. Currently, Servlet, JSP, Struts, Spring, Hibernate, JSF, etc. technologies are used for creating web applications in Java.
3) Enterprise Application
An application that is distributed in nature, such as banking applications, etc. is called enterprise application. It has advantages of high-level security, load balancing, and clustering. In Java, EJB is used for creating enterprise applications.
4) Mobile Application
An application that is created for mobile devices is called a mobile application. Currently, Android and Java ME are used for creating mobile applications.
There are four 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 the 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 which is mainly used to develop mobile applications. Remember the phones with keypad or button
4) Java FX
It is used in the development of RIA( Rich Internet Applications). It uses a light-weight user interface API.