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
If you do not want your class to be inherited by any other class. What would you do?
How is it possible for two string objects with identical values not to be equal under the == operator?
Can an unreferenced object be referenced again?
Can a class extend more than one class?
Can we have more than one package statement in source file ?
What is the difference between the size and capacity of a vector?
What is meant by binding in rmi?
What are peerless components in java programming?
How do you check if two strings are equal in java?
What is the reason behind using constructors and destructors?
What is the original name of java?
Is java ee a framework?
Explain java thread life cycle.
What is the difference between super class & sub class?
Does java trim remove newline?