Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
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[]){ System.out.println(reverseString("abc")); } //Write a function that takes a string in input and returns reversed version of string. // You are not allowed to use built-in reverse functions. public static String reverseString(String input){ String result=""; for (int i = 0; i < input.length(); i++) { result = input.charAt(i)+result; } return result; } }
run
|
edit
|
history
|
help
0
// Java Coding Challenge - 08: Reversing a Number using StringBuilder
Minimum Vertices to Traverse Directed Graph
2(B).
3.F
toStringMethodinJava
Integer to English Words
Size and signedness of Java ints and longs
Date_From_Str
sortArraymerge
Feet-inches input validation