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

Explain about assignment statement?

600


What is procedure writing?

515


When a byte datatype is used?

571


Can a abstract class be defined without any abstract methods?

565


What is thread life cycle?

544






Why vector class is used?

546


Why java doesn’t support multiple inheritances?

588


What is the difference between procedural and object-oriented programs?

528


What is the original name of java?

544


How will you initialize an Applet?

623


Can an abstract class be a final class?

531


How transient variable is different from volatile variable?

566


How does remove work in java?

526


Is null function in java?

570


What is jdbc api?

544