Introduction Of Java
Java
Java is a programming language. It is a high level, class-based and object oriented programming language.
We can say that Java is secured and a powerful language. Java runs on multiple platforms. It means that it can work on any software or hardware platform. It has a virtual machine specification. It has own runtime environment JRE (Java Runtime Environment) and an API (Application programming Interface) Specification.
Example of Java
In this program, we will create a class TestExample and print the statement.
Code
- public class TestExample {
- public static void main(String args[]) {
- System.out.println("This is a Simple Example of Java");
- }
- }
Output is given below
When is Java used?
Mainly, Java is developed for small embedded system like set-top boxes but now-a-days, there are many Java devices, used in a market.
Now, Java used in set-top-boxes, many digital devices, mobiles, games etc.
Java Applications
There are 4 types of Applications, where Java is used.
- Standalone Application
In Java, we use AWT and Swing to create Standalone Applications. Standalone Applications are known as a desktop Application, which are installed on an every machine.
- Web Application
In a Web Application, we use Servlet and JSP technologies in Java. Web Applications are used to design a dynamic page and it runs on the Server side.
- Enterprise Application
In Enterprise Applications, we use EJB in Java. These types of Applications are distributed in nature like Banking Applications etc. Its main advantages are robust security, load balancing and clustering.
- Mobile Application
In Mobile Applications, we use Android and Java ME in Java. It is mainly designed for the mobile devices.
Summary
Thus, we learnt, Java is an object-oriented programming language and also learn why we use Java.