Java is an object-oriented programming language with its runtime environment. It is a combination of features of C and C++ with some essential additional concepts. Java is well suited for both standalone and web application development and is designed to provide solutions to most of the problems faced by users of the internet era.
Just like we have some rules that we follow to speak English (the grammar), we have some rules to follow while writing a Java program. This set of these rules is called syntax. It’s like Vocabulary and Grammar of Java.
- Java is one of the most popular programming languages because it is used in various tech fields like app development, web development, client-server applications, etc.
- Java is an object-oriented programming language developed by Sun Microsystems of the USA in 1991.
- It was originally called Oak by James Goslin. He was one of the inventors of Java.
- Java = Purely Object-Oriented.
How Java Works?
- The source code in Java is first compiled into the bytecode.
- Then the Java Virtual Machine(JVM) compiles the bytecode to the machine code.
Where is Java being Used?
Now according to Sun, 3 billion devices run Java.
Java is one of the most important programming languages in today’s IT industries.
- JSP – In Java, JSP (Java Server Pages) is used to create dynamic web pages, such as in PHP and ASP.
- Applets – Applets are another type of Java programs that are implemented on Internet browsers and are always run as part of a web document.
- J2EE – Java 2 Enterprise Edition is a platform-independent environment that is a set of different protocols and APIs and is used by various organizations to transfer data between each other.
- JavaBeans – This is a set of reusable software components that can be easily used to create new and advanced applications.
- Mobile – In addition to the above technology, Java is widely used in mobile devices nowadays, many types of games and applications are being made in Java.
Types of Java Applications
- Web Application – Java is used to create server-side web applications. Currently, Servlet, JSP, Struts, JSF, etc. technologies are used.
- Standalone Application – It is also known as the desktop application or window-based application. An application that we need to install on every machine or server such as media player, antivirus, etc. AWT and Swing are used in java for creating standalone applications.
- Enterprise Application – An application that is distributed in nature, such as banking applications, etc. It has the advantage of high-level security, load balancing, and clustering. In Java, EJB is used for creating enterprise applications.
- Mobile Application – Java is used to create application software for mobile devices. Currently, Java ME is used for building applications for small devices, and also Java is a programming language for Google Android application development.
Features of Java
- Object-Oriented – Java supports the features of object-oriented programming. Its object model is simple and easy to expand.
- Platform independent – C and C++ are platform dependency languages hence the application programs written in one Operating system cannot run in any other Operating system, but in platform independence language like Java application programs written in one Operating system can able to run on any Operating system.
- Simple – Java has included many features of C / C ++, which makes it easy to understand.
- Secure – Java provides a wide range of protection from viruses and malicious programs. It ensures that there will be no damage and no security will be broken.
- Portable – Java provides us with the concept of portability. Running the same program with Java on different platforms is possible.
- Robust – During the development of the program, it helps us to find possible mistakes as soon as possible.
- Multi-threaded – The multithreading programming feature in Java allows you to write a program that performs several different tasks simultaneously.
- Distributed – Java is designed for distributed Internet environments as it manages the TCP/IP protocol.
Popular Java Editors
You will need a text editor to write Java programs. There is even more sophisticated IDE available in the market. But for now, you can consider one of the following:
- Notepad – On Windows machine, you can use any simple text editor like Notepad (Recommended for this tutorial), TextPad.
- Netbeans – is a Java IDE that is open source and free which can be downloaded from http://www.netbeans.org/index.html
- Eclipse – is also a java IDE developed by the Eclipse open source community and can be downloaded from http://www.eclipse.org/