Write a program to display numeric value in reverse order.
Ex: I have given a number like 7584, It should display in
reverse order like 4857.
Answer Posted / pradyumna
public class Test1 {
public static void main(String[] args) {
StringBuffer s1 = new StringBuffer("1234");
System.out.println(s1);
s1.reverse();
System.out.println(s1);
}
}
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is ejb container provider?
What is external subset?
What is basic authentication?
What is source file in java?
What is the best java compiler?
What is sandbox in java?
What is setfocusable in java?
What is the best java course?
What is credentials?
What is j2ee server?
What is component-managed sign-on ?
What is java developer job description?
What do you mean by j2ee module?
Define the struts in the j2ee framework?
what is interface in java ?can you explain with simple example?and what is the difference between abstract and interface?