Wednesday, 27 July 2011

Program to find the greater number from the three nos. using nested if else statement


Classs max
{
             Public static void main (String args[]) 

             {

Int a,b,c;
A=25; b=30; c=10;
if(a>b)

             {

if(a<c)

System.out.println(“a is maximum”);

else

System.out.println(“c is maximum”);

}
else

if(b>c)

System.out.printl(“b is maximum”);

else

System.out.printl(“c is maximum”);
}
               }

}

A simple program for addition of two values:



Class addition
{
Public static void main (String args[])
   {
int a = 5, b=10;
int c= a+ b;

System.out.println(“the sum of two value is :” +c);

    }
}

The Java Runtime Environment



The Java Runtime Environment (JRE) consists of the JVM and the program on the other. The Java Runtime Environment runs code compiled for the JVM by:


Loading the .class files
Verifying byte code
Executing the code

Just in Time Compilers (JIT)



-The Java Virtual Machine includes an optional ‘just-in time’ (JIT) compiler.
-The JIT:

       -Dynamically compilers byte code into executable code
       -Takes byte codes and compilers them into native code for the machine
       -Compiles programs on a methods by method basis just before they are called
       -Is faster than the Java Virtual Machine

Process of compilation

Java virtual Machine



  • All language compilers translate source code into machine code for a specific computer.
  • Java compiler produces an intermediate code known as byte-code for a machine.
  • This machine is called Java Virtual Machine (JVM ) and it exists only inside the computer’s memory.
  • It is simulator of computer wihin the computer and does all major functions of a real computer.                                                                                                                                                                    

Tuesday, 26 July 2011

Process of building and running java application programs


Twitter Delicious Facebook Digg Stumbleupon Favorites More