Answer Posted / narayanan
public class reverse {
public static void main(String args[]){
String s="malayalam";
StringBuffer sb=new StringBuffer();
int k=s.length();
for (int i = k-1; i >-1; i--) {
sb.append(s.charAt(i));
}
System.out.println(sb);
}
}
| Is This Answer Correct ? | 9 Yes | 0 No |
Post New Answer View All Answers
What is the statements?
What is a for loop in java?
What if constructor is protected in java?
When the constructor of a class is invoked?
What is java util hashmap?
What’s a deadlock?
What is the use of using enum to declare a constant?
Do I need to import java.lang package any time? Why?
What is the difference between final, finally and finalize() in java?
Is constructor inherited?
How do you invoke a method?
What is the use of beaninfo?
What is int short for?
How do you create a sop?
What is use of arraylist in java?