Java program to reverse a string in different ways

Write a java program to reverse a string

Way 1: Java program to reverse a string in following way

Input: sita is clever
Output: atis si revelc

Output:

Way 2: Java program to reverse a string in following way

Input: sita is clever
Output: clever is sita

Output:

Way 3: Java program to reverse a string in following way

Input: sita is clever
Output: revelc si atis

Output:

Help others by sharing the content!

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.