Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
string reverse program without arry in java
//'main' method must be in a class 'Rextester'. //Compiler version 1.8.0_72 //remove comments below to take string from user import java.util.*; import java.lang.*; class Rextester { public static void main(String args[]) { // Scanner sc=new Scanner(System.in); String str1="abhijeet",str2=""; System.out.println("enter String to reverse"); //str1=sc.nextLine(); for(int i=str1.length()-1;i>=0;i--) { char ch=str1.charAt(i); str2=str2+ch; } System.out.println(str2); } }
run
|
edit
|
history
|
help
0
java palindrome check
test no.1
Engine Java
4.b
3c
191fa07050
Fibonacci number 0 - 93
Consecutive Elements String
currency.java
1.7