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




How to Calculate the Future Investment Value of Investment.

Below java program for calculate future investment value. Here calculate s using the formula futureInvestmentValue =investmentAmount x (...