How can you reverse a string?

Answer Posted / palemraju

String str="how r u";
int length=str.length();
System.out.print("The reverse String is:");
while(len>0)
{
System.out.print(str.charAt(len-1));
len--;
}

Is This Answer Correct ?    11 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by boolean?

574


What is the difference between a vector & an array list?

674


What are facelets templates?

593


define the terminology association.

613


Why is sizeof not a function?

543






What is class??

753


How can constructor chaining be done by using the super keyword?

614


According to java operator precedence, which operator is considered to be with highest precedence?

599


What is use of static method?

532


List primitive java types?

591


What is annotation in java?

571


What is the significance of java packages?

609


Explain constructors and types of constructors in java.

642


Write a program to print count of empty strings in java 8?

534


Explain the private protected method modifier?

542