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


Please Help Members By Posting Answers For Below Questions

Difference between save and saveorupdate?

515


What are the j2ee technologies?

483


What type of code is java?

514


What are the four types of J2EE modules?

562


What is j2ee api?

512






Is java a web technology?

497


What is jlayeredpane java?

468


Why is java considered dynamic?

554


What is attribute what is asant?

512


Which server is best for java?

450


Why is java called technology?

492


What is devops in java?

523


What is event and listener in java?

420


Which is best eclipse for java?

483


What is java secure socket extension (jsse)?

508