Monday, August 20, 2012

String palindrome


Output:

StringPalindrome.java

package com.swain.cell;

public class StringPalindrome {
       public static void main(String args[])
          {
             String original="Himanshu";
             String rev="";
                      
             int length = original.length();
        
             for ( int i = length - 1 ; i >= 0 ; i-- )
                rev = rev + original.charAt(i);
        
             if (original.equals(rev))
                System.out.println(original+" is a palindrome.");
             else
                System.out.println(original+" is not a palindrome.");
        
          }
}



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

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 (...