// Write a Java Program to reverse a string without reverse() method
import java.util.*;
class ReverseString
{
public static void main(String[] args)
{
String s="Vishnu";
StringBuffer sb=new StringBuffer("");
for(int i=s.length()-1;i>=0;i--)
sb.append(s.charAt(i));
System.out.println(sb);
}
}
Write a Java Program to reverse an String without reverse() method |
0 Comment to "Write a Java Program to reverse an String without reverse() method"
Post a Comment