How can you reverse a string?

Answer Posted / haneef

public class Main {
public static void main(String[] args)
{
String str1="HANEEF";
for(int i=str1.length();i>0;i--)
{
System.out.print(str1.charAt(i-1));
}
}
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how hashmap works?

593


What is hotjava?

561


What is meant by object oriented programming – oop?

546


How do you take thread dump in java?

562


How a variable is stored in memory?

506






What is a class object?

501


What is an object class?

561


What are byte codes?

659


how do I create a runnable with inheritance? : Java thread

508


How many types of constructors are used in java?

543


What is the difference between error and an exception?

571


what is singleton in java?

602


What an i/o filter?

567


Describe method overriding

589


How do you control extraneous variables?

508