MBA-IT.com
Welcome About us Blogs News Contact Us Privacy Policy Terms Of Use  
Advertising
Business Research
Economics
Marketing
Human Resource Management
Software Engineering
Java

Start

Java Concepts

Java Data Types

Java Syntex

HelloWorld.java

PHP
 

 Blogs > Java > HelloWorld.java

Helloworld.java

Simple HelloWorld Example:

Following is a simple example to start your coding practices...

Class HelloWorld
{

    public static void main(String args[] )
    {

           system.out.println("Hello World!");


    }

}

You have to save the above code in file named "HelloWorld.java" because java language is case sensitve even if your operating system is not case sensitive like MS Windows.

Why java language source code file names are case sensitive?
Why we need to save the above code only with "HelloWorld.java" name?

As our class name is "HelloWorld" with H and W capital letters so as java language compiler which compiles the java language source code into byte code is case sensitive even on those operation systems which has no case distinction in file names.

When the compiler runs and compiles the .java file into .class files it will generate the resultant byte code file name in the same manner as the source code file, so the compilation of HelloWorld.java will produce the HelloWorld.class file after compilation.

 

© 2005 -2010 MBA-IT.com, All Rights Reserved

Contact us | Privacy | Terms of Use