I am curious about palindrome, how to change a word :

                               Franz

and then the word become :

                               znarF

My java code is :

class ArrVal
{
  public static void main (String[] args)
  {
   char value[] = {'F','r','a','n','z'};
   System.out.print("the original word  :" + '\n');
   System.out.print(value[0]);
   System.out.print(value[1]);
   System.out.print(value[2]);
   System.out.print(value[3]);
   System.out.println(value[4]);
   System.out.print("the word would be :" + '\n');
   System.out.print(value[4]);
   System.out.print(value[3]);
   System.out.print(value[2]);
   System.out.print(value[1]);
   System.out.println(value[0]);
   System.out.println("Dimension array size is : " + value.length);
  }
}

----------------------------------------------------------------------------------------------------
The output program is :

the original word  :
Franz
the word would be :
znarF
Dimension array size is : 5
----------------------------------------------------------------------------------------------------

My question :

1. Is there another way to change a word without accessing a character
of array one by  one to show it??
2. Is it possible create it in a String object?? how anybody give me
java snippet please??

somebody help me please??

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to