can you program for reverse string?

Answer Posted / suresh

class suresh
{
public static void main(String args[])
{
String s="sureshreddy";
for(i=s.length()-1;i>=0;i--)
{
System.out.println(s.charAt(i));
System.out.println(s.length());//it wil print the length
}
}
}

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

whatis Home interface and Remoteinterface? with example?

1555


Why we override equals() method?

571


Can we sort list in java?

609


Explain the features of interfaces in java?

561


What are constructors in java?

576






What is predicate in java?

562


What is equals method in java?

528


What is public static void main?

575


What is a dot notation?

554


How do you sort arrays in java?

528


How to optimize the javac output?

603


What are the elements of java?

569


How can you set the applet size?

585


What is the generic class?

533


Can we override private method?

562