Java Introduction
What is Java?
Java is a robust, high-level, secure, and object-oriented programming language. It provides a computing platform for the development of applications. Java is a programming language that has lesser implementation dependencies and also the reason for our digital lifestyle. Currently, it is widely used in developing the application for laptops, mobiles, gaming consoles, scientific equipment, etc.
It was developed by the sun microsystems in the year 1995. James Ghosting is the father of java (Programing Language).
Example
Print "Hello World"
public static void main(String args[]){
// Print Hello World
System.out.println("Hello World)");
}
}
What is Java Platform?
Java Platform is a collection of programs which help programmer or developers to develop and run Java programming applications efficiently.
Java Platform contains:
- Execution Engine
- Compiler
- Set of Libraries
Applications of Java
Technology is constantly evolving, due to this there are so many languages are used to develop them. Java is one of the popular programming languages and has a number of applications. Here I have written some applications of java.
- Web servers and Application servers
Types of Java Application
Java applications have to classified into:
- Standalone Application
- Web Application
- Enterprise Application
- Mobile Application
Standalone Applications
A program that doesn't require an operating system process and run by a separate computer process in the absence of an existing file process is known as a standalone application. Swing and AWT (Abstract Window Toolkit) are used to create stand-alone applications.
Web Applications
Web application is a client-server software application that is used to develop rich online applications like online retail sales and information websites. Java web applications are run by the client. Servlets and jsp are used to develop web applications.
Enterprises Applications
Enterprise applications is an application that used to develop web and enterprises applications. This type of application is mainly designed for corporates and includes topics like servlets, jsp, Web services, etc.
Mobile Application
This is the micro edition which mainly uses for developing mobile applications.
Java Features
Here are some important Java features:
- Easy to use and learn programming language.
- Once a code return, it will run on any computer platform.
- Java is a platform-independent language.
- Design for building and developing object-oriented applications
- Multithreaded language with automatic memory management.
- It is created for the vast and divided environment of the Internet.
Parts of Java Programming Language
A Java Programmer composes a program in an intelligible language called Source Code. Along these lines, the CPU or Chips never comprehend the source code written in any programming language.
These PCs or chips use language to understand the code in a code which is called machine language or code. These machine codes run at the CPU level. Thusly, it would be diverse machine codes for different models of CPU.
Notwithstanding, you need to stress over the machine code, as writing computer programs is about the source code. The machine comprehends this source code and makes an interpretation of them into machine reasonable code, which is an executable code.
Every one of these functionalities occurs inside the accompanying 3 Java stage segments:
Java Development Kit (JDK)
JDK is a product improvement climate utilized for making applets and Java applications. The JDK stands for Java Development Kit. Java engineers can use it on macOS, Solaris, Windows, and Linux. JDK encourages them to code and runs Java programs. It is conceivable to introduce more than one JDK form on a similar PC.
Why use JDK?
Here are the primary purposes behind utilizing JDK:
JDK contains devices needed to compose Java projects and JRE to execute them.
It incorporates a compiler, Java application launcher, Appletviewer, and so forth
Compiler changes over code written in Java into byte code.
Java application launcher opens a JRE, loads the fundamental class, and executes its principle technique.
Java Virtual Machine (JVM):
Java Virtual Machine (JVM) is a motor that gives a runtime climate to drive the Java Code or applications. It changes over Java bytecode into machine language. JVM is a piece of the Java Run Environment (JRE). In other programming dialects, the compiler produces machine code for a specific framework. Nonetheless, the Java compiler produces code for a Virtual Machine known as Java Virtual Machine.
Why JVM?
Here are the significant explanations behind utilizing JVM:
JVM gives a stage autonomous method of executing Java source code.
It has various libraries, apparatuses, and structures.
When you run a Java program, you can run it on any stage and save heaps of time.
JVM accompanies JIT (Just-in-Time) compiler that changes over Java source code into low-level machine language. Subsequently, it runs quicker than a standard application.
Java Runtime Environment (JRE)
JRE is a piece of programming that is intended to run another programming. It contains the class libraries, loader class, and JVM. In basic terms, in the event that you need to run a Java program, you need JRE. On the off chance that you are not a developer, you don't have to introduce JDK, yet only JRE to run Java programs.
Why use JRE?
Here are the fundamental reasons for utilizing JRE:
JRE contains class libraries, JVM, and other supporting records. It does exclude any apparatus for Java advancement like a debugger, compiler, and so forth. JRE uses classes like swing, util, lang, at, math, and runtime libraries.
In the event that you need to run Java applets, JRE should be introduced in your framework.
0 Comments