core java explained in detail

In this post, we will see what is Java, Java Features, and JVM i.e Java Virtual Machine Architecture.

1. What is Java?

Java is a programming language and a computing platform for application development. It was first released by Sun Microsystem in 1995 and later acquired by Oracle Corporation. It is one of the most used programming languages. More about Java in detail.

2. What is Java Platform?

Java platform is a collection of programs that help to develop and run programs written in the Java programming language. Java platform includes an execution engine, a compiler, and a set of libraries. JAVA is a platform-independent language. It is not specific to any processor or operating system.

3. How is Java Platform Independent?

Like C compiler, Java compiler does not produce native executable code for a particular machine. Instead, Java produces a unique format called bytecode. It executes according to the rules laid out in the virtual machine specification.
Bytecode is understandable to any JVM installed on any OS. In short, the java source code can run on all operating systems.

4. Features of Java:

·   Object-Oriented

In Java, everything is an Object. Java can be easily extended since it is

based on the Object model. Java inherits the Oops features like abstraction, encapsulation, inheritance, polymorphism.

·    Platform Independent

Unlike many other programming languages including C and C++, when Java is compiled, it is not compiled into a platform-specific machine, rather into platform independent byte code. This byte code is distributed over the web and interpreted by virtual Machine (JVM) on whichever platform it is being run.

·   Simple

Java is designed to be easy to learn. If you understand the basic concept of OOP we can easily become master in java.

·   Secure

With Java's secure feature it enables us to develop virus-free systems. 

It allows all the Java programs to run inside the sandbox only and prevents many activities from untrusted resources including reading or writing to the local disk, creating any new process, or even loading any new dynamic library while calling a native method.

Java never uses any kind of pointers. Java has an internal mechanism for memory management.

Byte code is another thing that makes Java more secure.

·   Architectural-neutral

Java compiler generates and the architecture-neutral object file format which makes the compiled code to be executable on many processors, with the presence of the Java runtime system.

·    Portable

Java is portable because of being no implementation-dependent aspects of the specification. Compiler in Java is written in ANSI C which makes it portable.

·    Robust

Java is robust because of strong exception handling techniques and strong memory management. Java makes an effort to eliminate error-prone situations by focussing on compile-time error checking as well as runtime checking. Also, Java has an automatic garbage collection process that frees the memory by deleting no longer used objects.

·   Multithreaded

With Java's multithreaded feature it is possible to write programs that can do many tasks simultaneously. This allows us to minimize the workload of a single thread and to minimize the execution time.

·   Interpreted

Java byte code is translated on the fly to native machine instructions and is not stored anywhere.

·    High Performance

With the use of Just-In-Time compilers, Java enables high performance. Because JIT executes the bytecode only on a requirement basis.

·    Distributed

Java is designed for the distributed environment of the internet where we can implement client-server applications, also invoke remote methods.

·    Dynamic

Java is considered to be more dynamic than C or C++ since it is designed to adapt to an evolving environment. Java programs can carry an extensive amount of run-time information that can be used to verify and resolve access to objects on run-time. 

5. Architecture of JVM(Java Virtual Machine)



1. Java is known as a platform-independent language because when java compiler compiles the java code which resides in a .java file.
 
2. It will get converted to byte code which resides in .class file. This byte code can be executed on every platform(operating system) by JVM on that platform.

3. Though JVM is implemented differently for different platforms, all JVMs can read the same byte code. HotSpot provides a Just-In-Time (JIT) compiler for bytecode. 

4. When a JIT compiler is part of the JVM, selected portions of bytecode are compiled into executable code in realtime, on a piece-bypiece, demand basis.




That is all about basic java, java features, and JVM architecture.

Useful Topics:


more topics are coming soon...






Previous
Next Post »

3 comments

Click here for comments
Unknown
admin
1 September 2020 at 17:13 ×

Nice covered tutorial πŸ‘

Reply
avatar
Unknown
admin
1 September 2020 at 17:14 ×

Nice content and tutorial πŸ‘

Reply
avatar
Rani J
admin
1 September 2020 at 17:20 ×

Nice postπŸ‘

Reply
avatar