Hi Experts
how to implement this in Java . example problem:
1) Input string e.g "HAL"
2) Output IBM ( each letter in string replaced with next character whatever comes in ABC...
Thanks
you could use a StringBuffer
http://java.sun.com/j2se/1.3/docs/api/java/lang/StringBuffer.html
which is similar to a String but you can change the contents, e.g.
-
StringBuffer s=new StringBuffer("HAL");
-
s.setCharAt(0,(char)(s.charAt(0)+1));
-
incremenets the first character of the string H to I so it becomes
IAL
you could use a loop to increment all the characters