//reverse of a string
import java.lang.*;
class test
{
public static void main(String[] args)
{
String s="hi how are you yogi";
for (int i=s.length()-1;i>=0 ;i-- )
{
System.out.print(s.charAt(i));
}
}
}
import java.lang.*;
class test
{
public static void main(String[] args)
{
String s="hi how are you yogi";
for (int i=s.length()-1;i>=0 ;i-- )
{
System.out.print(s.charAt(i));
}
}
}
No comments:
Post a Comment