Tuesday, August 21, 2012

Hello world in eclipse Or How to create class file in eclipse


Right click on the source folder then select new, then click class then next popup will be show.

Type package name just like com.swain.cell.java.example.
Type class name just like Hello(Class name should be stating with capital letter).
Then finish.  

// amazon ebay shopbob.com hotels.com canon newegg.com 

Hello.java

package com.swain.cell.java.example;

public class Hello {

       /**
        * @param args
        */
       public static void main(String[] args) {
              // TODO Auto-generated method stub
              System.out.println("hello world");

       }

}

Right click on the programme then popup will be show then select run as then java Application.


Output

Hello world




No comments:

Post a Comment

How ChatGPT can Benefit Coding: Your Guide to Leveraging an AI Language Model

 Introduction: Hello, coders! Welcome to this blog post on how ChatGPT, an AI language model, can benefit your coding skills and projects. A...