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 states of thread in java?
Which one will take more memory: an int or integer?
Explain java heap space and garbage collection?
How do generics work in java?
What state does a thread enter when it terminates its processing in java programming?
Is java a software?
What best practices should you follow while writing multithreaded code in java?
What is difference between iterator access and index access?
What does ide stand for?
What are the drawbacks for singleton class?
What is the different between get and post?
What is a top level class in java?
Is java type safe?
Explain scope or life time of local variables in java?
Say any two properties in beans?