How can you reverse a string?

Answer Posted / venki from hyd

class ReverseString
{
static String name="Hello";
public static void main(String args[])
{
String rname;
for(int i=name.length(); i<0; i--)
{
rname=name.charAt(i);

}
System.out.println(rname);

}

}

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is public static?

497


Explain about the interpreter in java?

625


What are different types of classloaders?

589


What is the basic of java?

573


Given a singly linked list, determine whether it contains a loop or not without using temporary space?

586






Define jit compiler?

664


What is the difference between equals() and == in java?

531


State two differences between C and Java.

695


What is java string pool?

545


What is the program compilation process?

588


what are three ways in which a thread can enter the waiting state? : Java thread

578


what is nested class in java?

603


How to compare strings in java?

506


How to disable caching on back button of the browser?

531


Can we store variables in local blocks?

790