# Advance Java Notes (Exam Purpose)

### **Java: An Overview**

* Java is an open-Source.
    
* Java is a class based.
    
* Java is high-level programming language.
    
* Java is an object-oriented programming language.
    
* Java is platform independent.
    
* Java programs are compiled into byte code.
    
* Java programming language was created by James Gosling.
    
* Gosling worked along with his team also called the Green Team.
    
* Project were worked on was called Greentalk.
    
* Java 10 enhanced 70+ APIs with new methods and options and removed deprecated APIs and options.
    
* Immutable Collections.
    
* Enhanced Garbage Collection.
    
* Heap Allocation on Alternative Memory Devices
    
* ### `Types of Java applications:`
    
    #### **A.    Web Application:**
    
    Web applications are the applications that run on web browser using servlet, JSP, struts technologies. These technologies create java web applications and deploy them on server.
    
    **B.    Mobile Application:**
    
    These are mobile applications created using java.
    
    #### **C.    Standalone Application:**
    
    Standalone applications are executed by themselves without the need of other programs and files. Example of such an application is antivirus.
    
    #### **D.    Enterprise Application:**
    
    Some applications are designed for corporate organizations with the intent to control major process in real time. Such applications are called enterprise applications.
    

### `Features`

* **Robust** - Java emphasizes a lot on error handling, type checking, memory management, etc. This makes it a robust language.
    
* **Multithread** - It is an important feature provided by java for creating web applications.
    
* **Dynamic** - Java is designed to adapt to ever evolving systems thus making it dynamic.
    
* **Simple** - Java is simple to understand, easy to learn and implement.
    
* **Portable** - Java is not necessarily fixated to a single hardware machine. Once created, java code can be used on any platform.
    
* **Secured** - It is possible to design secured software systems using Java.
    
* **High Performance** - Java uses Just-In-Time compiler thus giving us a high performance.
    
* **Object**\-**Oriented** - In object-oriented programming everything is an object rather that function and logic.
    
* **Platform Independent** - Java is write once and run anywhere language, meaning once the code is written, it can be executed on any software and hardware systems.
    
* **Interpreted** - Java converts high-level program statement into Assembly Level Language, thus making it interpreted.
    

## `JVM / JK / JRE`

### *Java Virtual Machine*

* The Java Virtual Machine (JVM) is a virtual machine that provides a runtime environment to execute java bytecode.
    
* The java program is converted into java bytecode which is then translated by the JVM into machine code which can be then understood by the CPU to get the output.
    

### Java Development Kit

* The Java Development Kit (JDK) is a superset of JRE and is used to create java applications.
    
* There are three **JDK** provided by Oracle; Java Enterprise Edition (Java EE), Java Standard Edition (Java SE), and Java Mobile Edition (Java ME).
    

### Java Runtime Environment

* The Java Runtime Environment (JRE) provides java libraries, the JVM and other files and documents that are needed to run java applications.
