Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Problem: rstring
//'main' method must be in a class 'Rextester'. //Compiler version 1.8.0_111 import java.util.*; import java.lang.*; class Rextester { public static void main(String args[]) { String str = "MubashirNaseem"; System.out.println("Answer : " + func(str)); } public static String func(String str){ char[] arr = str.toCharArray(); String result = ""; for (int i = arr.length-1; i>=0; i--){ result=result+arr[i]; } return(result); } }
run
|
edit
|
history
|
help
0
Palindrome Number in Java
OurDate.java
Basic LinkedList in Java
first activity
Switch case example
linkl
Piramid
Bound Types
A
Consecutive Elements String