Internal Working and Features Of JAVA



Over the years, Java has become one of the most widely used object-oriented programming language due to its varied use seen in mobile applications like android, which is Java-based, web applications, desktop & enterprise software.


This post is part of a series started by CollegeIntegral to provide easy-to-understand learning material on java, if you want to learn about introduction to java click here.

Java Editions & which to choose?

Remember before installing any java editions understanding the requirement is a must.

If you are learning java, you should download the java Standard edition as the other editions are for specific purposes.

Java Micro Edition is for the development and deployment of codes for embedded and mobile devices.
It’s used in micro-controllers, sensors, and printers.

Java Enterprise Edition is not for your use if you aren’t working in e-commerce, accounts, or banking systems, generally this edition is used to handle transactions and scalability.


Main Features of Java




The primary goal of java is to be a portable, secure platform-independent language, the most important of those are:

1. Simple & Portable

Simplicity and efficient task orientation in java makes it one of the best languages for apps.

In comparison to its predecessor languages of C, and C++ it is drastically easier to learn, and its syntax is clean, easy to understand, and implement. Java is straight in its approach; unnecessarily ambiguous topics are re-worked in a simpler way e.g., explicit Pointers, operator overloading, multiple inheritance, and explicit memory allocation to name a few.

Java is a portable language, as long as you have installed the java development kit installed or an ide that can run java you can port the codes

2. Secure, Robust with exception handling

Java emphasizes exception handling with a focus on compilation errors, memory errors, mishandling of exceptions such as index-out-of-bound exceptions, and runtime errors.

Java’s garbage collector is another tool for this.

Java is a secure language, with the access modifiers major security concerns can be put to rest as private, protected, default, and public access modifiers provide vast generalizations needed to maintain privacy and security breaches, including this other such tools are also present to ensure security such as 
"Bytecode Verifier""Security Manager ClassLoader."

Bytecode Verifier checks for code that is not adhering access rights.


3. Platform independency & Architecture Neutrality

Java code can be run on any platform as JDK ensures that the secured bytecode converted from the java program can be run on any platform, making it platform-independent.

Any platform with a java runtime environment can run these bytecodes unlike other counterparts such as C, and C++ which are compiled based on platform-specific machines making it architecturally neutral as a computer’s architecture isn’t taken into account when a byte code conversion is worked upon.

An example of architecture dependency would be the 32-bit & 64-bit formats of architecture in C requiring different sizes of memory.

4. Object-oriented programming based

Object-oriented programming is a programming methodology that eases software development and management.
This methodology is great for working on real-time programs and software tackling real-world problems as object-oriented programming takes clues from the real world.

Class-based, Object-orientation is one of the main fundamentals Java is based on, this feature covers up the lacking in C. We shall learn more about this later.


5. Multithreaded approach

A thread is a concurrently running program sharing a common memory.

Multithreading is the better way of doing things, gone are the days when computers fixated on a single task and worked on the next one only after the first task, nowadays computers and complex machines work on a lot of tasks simultaneously and that is what is called multithreading, and such is the case for java.

You wouldn’t want a language that can’t work with multithreading now, will you?

6. Dynamic with Better performance

Java is dynamic as there is dynamic loading of classes and dynamic compilation.

Java has a large network of developers who maintain the industry relevancy and update java while simultaneously ensuring great performance. These developers also work on classes for java.


Internal Working of Java

To run java, you need JDK (Java development kit). It’s the software development kit for java that is used for java applications and java applets, it has the Java runtime environment, javac, jar, java loader, and other files necessary for running java.

After writing the code JAVAC compiler compiles the code regardless of the OS, providing the bytecode (.class file) and a ClassPath based on which JVM (Java Virtual Machine) runs the bytecode.



ClassLoader loads the class and the .class file is checked by the bytecode verifier after which JVM (part of JRE) interprets the code and runs it.

The garbage collector recollects the memory after the code is run ensuring memory management to some extent.

JRE included with other supporting files creates the JDK.





Post a Comment

Previous Post Next Post