Answers for "reverse string in java particular word"

23

how to reverse a string in java

public class ReverseString {
    public static void main(String[] args) {
        String s1 = "neelendra";
        for(int i=s1.length()-1;i>=0;i--)
            {
                System.out.print(s1.charAt(i));
            }
    }
}
Posted by: Guest on March-14-2020
1

java reverse a word

To reverse a word 

- Put all the letters in a stack and pop them out. 
Because of the LIFO order of stack, you will get the letters in 
reverse order.
Posted by: Guest on October-13-2021

Code answers related to "reverse string in java particular word"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language