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

What does replaceall do in java?

700


What is oops in java?

777


What do you understand by a Static Variable?

900


What do you mean by global variable?

719


Is nan false?

731


What is the difference between double and float variables in java?

864


Why are variables important in research?

751


In a container there are 5 components. I want to display all the component names, how will you do that?

1874


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

768


Why packages are used?

866


What is autoboxing in java?

823


Explain about OOPS concepts and fundamentals.

820


What is serialization in java?

803


What is a method in programming?

882


What are advantages and disadvantages of OOPs?

873