Posts

Showing posts from 2017

Static and Dynamic Memory Allocation in JAVA

In JAVA the class contains two types of things within it which are                                                                1. Data Members                        2. Member Functions or Methods Since Data Members represent the properties of the objects and the Methods or functions within a class represent the behavior of the object of class type.     object is the entity which can have the Data Members and Methods of the class . lets consider we have a class which is as follow:                         class  Student{                                 String name;          ...

Objects and Classes In JAVA

Image
Object:-                 In real world scenario there exist different type of objects, basically objects are the thing which have some properties and some behaviors.        like a smartphone, a smartphone is the object which have different properties and behaviors , a smartphone have properties like its color, manufacturer, RAM size, ROM, processor etc. and the behavior of smartphones are calling, net surfing, calculation, data storage etc.         we can take an another example of an object. We take a scenario of an Employee. An employee is the object which has some properties like his name, age , company name, salary ,department etc . it can have behaviors too like production, how employee work, work over projects , growth of employee in the company, employee's work rate etc.             Like policeman is an object , A police...

Variables and Datatypes in JAVA

Image
Variable :-           V ariables are just a name given to a particular memory location, where it can store the data. Variables are just like label which points to a memory location. This memory location is used to hold the data or store the data.    Examples:-                           int num;                        char mchar;                                    float denum;                               boolean tf_result; Here in the above examples,                       num, mchar, denum,  tf_result represents the name of the variables. and int, char, float, boolean defines the type of dat...

Difference between JDK, JRE, JVM and JIT

Image
Pupils are generally confused about JDK, JRE, JVM and JIT in JAVA. The below given explanation is quite better to understand these terminologies properly. 1. JVM:-     JVM is the virtual machine which can execute the byte code. JVM is the platform dependent code while byte code is platform independent code. So there exist different JVM for different operating system. The below diagram can explain how the JVM is used to execute the java Byte Code. for to know more about JVM visit the link:  JVM Explanation and working 2. JIT:-       JIT is the Just In Time compiler. It analyses the whole code and analyses the code which is used again and again. it convert those classes to specific machine code faster processing. It can identify the code which is being used again and again and then place them in cache memory. when JVM needs these code for execution then it will catch the code from cache memory. so it makes the execution faster. That is why ...

Why JAVA Important and used mostly for Software Development

Image
Why JAVA is important and why it is used mostly in Software Development JAVA language is used widely in software development and it is considered very important language for the sake of Software Development and Web Applications Development. JAVA have so many features which makes it amazing and wonderful and some of them are explained below and which are the major features due to which JAVA is best programming language: JAVA follows Object Oriented Programming approach to solve a particular problem. Which makes use of Objects, Classes and PIE. PIE symbolize Polymorphism, Inheritance and Encapsulation. JAVA is a platform independent language which does not depends upon the configuration of Operating System and hardware. A JAVA program which is written on any system configuration can be run on any other system having different configuration of Operating System and hardware. JAVA makes use of Byte Code. Which is an encoded in a specific machine readable language tha...

JAVA VIRTUAL MACHINE (JVM)

Image
JVM (Java Virtual Machine) JVMs are available for many hardware and software platforms (i.e. JVM is platform dependent).JVM (Java Virtual Machine) is an abstract machine. It is a specification that provides runtime environment in which java bytecode can be executed. What is JVM It is: A specification  where working of Java Virtual Machine is specified. But implementation provider is independent to choose the algorithm. Its implementation has been provided by Sun and other companies. An implementation  Its implementation is known as JRE (Java Runtime Environment). Runtime Instance  Whenever you write java command on the command prompt to run the java class, an instance of JVM is created. What it does The JVM performs following operation: Loads code Verifies code Executes code Provides runtime environment JVM provides definitions for the: Memory area Class file format Register set Garbage-collected heap Fatal error reporting etc. Let's...