0

A program to reverse string "Malayalam"?

8th Oct 2016, 2:04 AM
Danish Khan
Danish Khan - avatar
4 Answers
+ 3
public class Reverse{ public static void main (String[] args){ StringBuilder string = new StringBuilder("Malayalam"); System.out.println(string.reverse()) ; } }
8th Oct 2016, 6:43 AM
Osah Prince
Osah Prince - avatar
+ 1
public class Reverse{ public static void main(String[] args){ String str = "Malayalam"; String reversedStr = ""; for(int i=str.length()-1; i>=0; i--){ reversedStr += str.charAt(i); } System.out.println(reversedStr); } } and lol it is the same string when it is reversed xD
8th Oct 2016, 9:20 AM
Ran
Ran - avatar
0
Public class { public static void main( string[ ] args) { strigBuilder("Malayalam") ; system.out.printIn(string.reverse ()) ; } } Java coding 💯
14th Oct 2021, 3:33 AM
Shubham Bhatia
Shubham Bhatia - avatar
- 2
Just print it out!
8th Oct 2016, 5:09 AM
Mythos