Tuesday, November 27, 2007

Block Diagram Of Java Virtual Machine



Class loader sub system in Java Virtual Machine(JVM) will do the following tasks.

1.It loads the dot class files into memory.

2.Then it verifies byte code instructions.

3.Finally it will allot memory needed for the program.

Note:Class loader is a piece of software that is part of JVM and it is used to read the information available in the "dot class" file and put this information in the method area.

Note: We get dot class files(these files contain 'byte code') when we compile our source code.


The memory is divided into five parts called run-time data areas.

Method Area: Method area is used for storing the information about the java classes.

Stack Space: When the JVM runs a method it stores the parameters and the local variables of the method in the memory area called as stack space.

Heap Area : Objects are created on "Heap Area".

Java Stacks: Java stacks are the places where Java methods are executed. Each method is executed on a separate frame in Java Stacks.

Program Counter Register's: These registers show memory address of the next instruction to be executed by the micro processor.

Native Method Stacks:Native method stacks are executed on native method stacks.

Execution Engine: This contains interpreter and Just in Time Compiler(JIT) which converts the byte code into the machine code so that the micro processor will execute that machine code and display the results.

Saturday, November 17, 2007

Introduction To Java

Let's start our discussion from the features that Java provides.

Features of Java :

1.Simple : Java is a simple programming language. Pointers are not available in .
Java resembles with C,C++ languages.
In Java some features(pointers) of C language are deleted.
Reason: Pointer's lead to confusion for a programmer.
->Pointers may crash a program easily.
->Using pointers harmful programs like virus and hacking programs can be developed.

2. Object Oriented: Java is an object oriented programming language. Using java we can create objects and classes.

Definition of an Object: Any thing that exits in this real world is an Object.
An object will have ‘properties’ and perform some ‘Actions’.
Properties are represented by ‘Variables’ and ‘Actions’ are represented by ‘methods’ (nothing but the functions in C language).

Definition of a Class: A class is a group name that specifies properties and actions for a group of Objects.
A class is a ‘model’ for creating the objects.
Objects are created from a class.
Object does not exist without a class, but a class can exist without any object.
Note: In Java we must use atleast one Class during a program

3. Distributed: Information is distributed on a various computers on a network.

4. Robust: Java programs will not terminate in the middle.

5. Secure: Java enable the construction of virus-free and tamper free systems.

6.Architecture Neutral : Java’s byte code is not machine dependent.

7. Portable : Java programs give same results on all machine unlike program’s. This is the major reason for C and C++ programs being not used on the internet as INTERNET contains different machines with different configurations.

So...what is the difference between C and Java?
Difference: C is a platform dependent while Java is an platform independent. Now you might be thinking what is platform dependent and independent?Try to compile a C program that has been developed on your computer and also try to recompile it on your friends computer. You cannot do that because, C is a platform dependent language but a Java program developed on your machine can be run on your friends machine because Java is platform independent and this is the reason that Java applications are being used on the internet.
In the next post we will see some more features of Java. Thank You!

Friday, November 16, 2007

Introduction

Hi all...this is my first post in this blog and I would like to share what I have learnt in Java! In the coming posts I'll explain Java from the basics in detail!! This may sound silly for the non-beginner's, but I want the beginner's to gain knowledge on Java from my Blog.So,we will start learning Java from my next post.Your comments are most welcome..

Thank You,

JR

Java Rocker ;)


Academics blogs


If you like my blog please do vote for my blog using the button below.Thank You!

Top Blogs
Blogger Forum: About Blogging for BloggersExactSeek - Submit 4 FREE





Credit Card Deals Start Your Home BusinessN Tips for home business TrafficWave Matrix Buster Internet Business Opportunity Free Backlinks