Tuesday 7 August 2012

JAVA RUNTIME ENVIRONMENT !!


Hi Friends !! Today our topic is How the java program run and what are the steps to be followed to run a Java program…..????


  JAVA RUNTIME ENVIRONMENT !!

The below flow diagram  illustrates the JRE and how it enforces security.


          

Java software source files are complied in the sense that they are converted into a set of byte codes from the text format in which you write them. The bytecodes are stored in class files.

At runtime , the bytecodes that make up a Java software program are loaded , checked, and run in an interpreter. In the case of aaplets , you can download the bytecodes, and then they are interpreted by the JVM built into the browser.

The interpreter has two functions:=>

  •  It executes the byte codes.
  •  It  makes the appropriate calls to the underlying hardware.


NOTE: Sun Microsystems has enhanced the JVM machine by adding new performance-enabling technologies. One of these technologies is called the Java HotSpotTM virtual machine and has the potential to enable the Java programming language to run as fast as complied C++ code.
  

 How to make a simple Java Program….????

Now going to make first program to print hello word in the screen of the computer.

public class MyFirstJavaProgram
{
 /* This is my first java program.
  * This will print 'Hello World' as the output
  */
public static void main(String[] args)
{
System.out.println("Hello World");
// prints Hello World
}
}


Some points taken in consideration while writing programs in java……

These are following:=>

  • Case Sensitivity
  • Class Names->For all class names the first letter should be in Upper Case. 



If several words are used to form a name of the class each inner words first letter should be in Upper Case.

Example class MyFirstJavaClass:->


Method Names->
  •     All method names should start with a Lower Case letter. 
  •      If several words are used to form the name of the method, then each inner word's first letter should be in Upper Case.

   Example public void myMethodName()


Program File Name -> Name of the program file should exactly match the class name.

public static void main(String args[]) -> Java program processing starts from the 

main() method which is a mandatory part of every Java program.

Now !! You can download doc file of this article by just click on download link
which is as given below ...

I hope this post will help you !!

If still you have some query regarding to this article then please post your comment after that 1 will 100 % help you...

1 comments:

Post a Comment

Hey thanax alot to comment i will revert you back soon...

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites