Answer Posted / aravinda reddy
String reverse without using reverse method string class
public class StringReverse {
public static void main(String[] args) {
String str = "Aravind";
StringBuffer s = new StringBuffer();
char[] ch = str.toCharArray();
int n = ch.length;
for(int i=n-1;i>=0;i--)
s.append(ch[i]);
System.out.println(s.toString());
}
}
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is double word?
what is a green thread? : Java thread
What is the purpose of finalization in java programming?
What is the exact difference in between Unicast and Multicast object? Where will it be used?
What is the difference between the prefix and postfix forms of the ++ operator?
What is difference between public static and void?
What does serializing data mean?
Can you call a method on a null object?
What is r in java?
What does mean in regex?
Can a class extends itself in java?
What is multithreading in java?
What does int argc char * argv [] mean?
When should I use singleton?
What variables are stored in stack?