..:: MALAYSIA COMMUNITY OFFICIAL WEBSITE ::..
Copyright © 2010 Malaysia Community. All right reserved by MarHazK (Marhazli)
 

Go Back   Malaysia Community > Internet Technology > Programmings > Java, J++

Reply
 
Thread Tools Display Modes
  #1  
Old 10-21-2009, 02:16 PM
RiddlerEnigma11 RiddlerEnigma11 is offline
Super Moderator
 
Join Date: Jan 1970
Location: Cat City
Posts: 19
Thanks: 0
Thanked 3 Times in 3 Posts
Smile Java Hello World

Code:
/*
This is the simple java program
save it as HelloWorld.java
*/

public class HelloWorld
{
     String a = "HelloWorld"; //variable declaration & assignment
     public void display() //instance method
     {
           System.out.println(a);
      }
           public static void main(String args[]) //class method
           {
                   HelloWorld hw = new HelloWorld();
                   hw.display();
          }
}
__________________
Riddler Enigma 11




Last edited by RiddlerEnigma11; 10-21-2009 at 02:24 PM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 09:28 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.