JAVA
java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
🏆🏆🏆CHALLENGE🏆🏆🏆 Playing with Strings
This is a modified challenge from another challenge.
Task==> You have to modify the string in such a way that their order remains same but the word itself is reversed.
Example:
Input==> This is a Sololearn Challenge
Output==> sihT si a nraeloloS egnellahC
All The Best!!!
*/
import java.util.Scanner;
public class ReverseLetters
{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String phrase[]= new String[100];
phrase = sc.nextLine().split(" ");
for(int i=0; i<phrase.length; i++)
{
System.out.print(phrase[i] + " ");
}
System.out.println("\n");
for(int i=0; i<phrase.length; i++)
{
StringBuffer sb = new StringBuffer(phrase[i]);
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run