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 / deepak

public class A
{
public static void main(String str[])
{
String s="7584";
System.out.println(s);
s.reverse();
System.out.println(s);
}}

Is This Answer Correct ?    7 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I am newbie in J2EE & looking for strong basic behind each concept as, Why do we use private access specifier before each variable of type property bcoz ultimately to access it outside the class we use public method as getter & setter ? If we use getter & setter to access it outside the class so better we make variable as public so that it is easily available outside of the class... Please guide me why do we use as private ????

5019


What is the preferred size of a component in java?

461


What is the difference between load() and get()?

558


i want test pattern of zylog company and some examples also

2308


Is java 100 percent pure object oriented?

507






Who gave the name java?

476


What is general entity?

523


What is java application server?

488


What is the concept of connection pooling?

557


What is java secure socket extension (jsse)?

523


What is wildfly java?

489


Why java is oop language?

556


whay java does not support bass by reference

2365


What are types of j2ee clients?

512


What are web technologies in java?

455