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
Explain restrictions on using enum?
Can a hashset contain duplicates java?
What is a ?
Explain method overloading?
Differentiate between array list and vector in java.
Which variable is the independent variable?
What is bifunction in java?
Why do people says “java is robust”?
When should I use singleton pattern?
What are use cases?
What is singleton pattern?
What initialize variables?
What is the difference between array list and vector in java?
Can we create our own daemon thread?
What is difference between hashset and hashmap in java?