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 are the different types of sorting in java?
How many types of assembly languages are there?
What is difference between final and immutable?
How do you check if an arraylist is not empty?
Why is the singleton pattern considered to be an anti pattern?
What is the maximum length of a url?
What is assembly language?
What is final class?
Who developed java?
What is the implementation of destroy method in java. Is it native or java code?
Why we cannot override static method?
How would overload a function based on return type?
What is called module?
How can you traverse a linked list in java?
What is t in generics in java?