JVM is a java virtual machine that enables our system to run the java program(.class). In other words, we can say JVM follows the bytecodes and convert it according to the existing OS, no matter which OS is running in the system. JVM is an abstract machine. There are available for many hardware and software platforms.

JVM Architecture

JVM Architecture
JVM Architecture
  • Classloader
    • It is a subsystem of JVM which is use to load class files.
  • Class Area
    • Class Area stores per class structures.
  • Heap
    • Heap is the runtime data area in which objects are allocated.
  • Stack
    • Stack stores frames. It holds is local variables.
  • PC Register
    • PC register contains the address of the JVM instruction currently being executes.
  • Native Method Stack
    • It is contains all the native methods use in the application.
  • Java Native Interface
    • Java Native Interface is a framework which provides an interface to communicate with another application written in another language such as C++, C, etc.

How do work of JVM

  • Executes code
  • Provides runtime environment
  • Verifies code
  • Loads code

Package

package is the collection of classes that can be use within programs, package is the directory (folder) is knows as Package.

Syntax

import packageName;  

Types

There are two types java package

  • Library package
  • User defined package

Library Package

Library packages are those packages provided by java programming. These packages include classes which is useful in program for output, input, mathematical, network program, window program etc. Library package can be written as import java. Package name.*/class name;

Library package Name

  • Java.io
    • It includes classes relate with input/output.
  • Java. Lang
    • It include classes relate with flow of programming. It is default package.
  • Java.awt
    • It contains the classes relate for window programing.
  • Java. Swing/swingx
    • It also contains classes relate with the adv. Window programming.
  • Java.net
    • It contains classes relate with network programming.
  • Java. Applet
    • It contains classes related with applet programing.
  • Java. Util
    • All the new feature base or additional classes defined within java util package.

If you have any queries regarding this article or if I have missed something on this topic, please feel free to add in the comment down below for the audience. See you guys in another article.

To know more about JAVA Wikipedia please  click here .

Stay Connected Stay Safe, Thank you

Categories: Software

Basic Engineer

Hey Readers! We have more than fifteen years of experience in Software Development, IoT, Telecom, Banking, Finance and Embedded domain. Currently we are actively working on Data Science, ML and AI with multiple market leaders worldwide. Happy Reading. Cheers!

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *