Reverse a string in Java without using . reverse()
Anonym
Public static ReverseString{ public static void main(String[]args){ String str="Hello"; String reversed=""; for(int i=str.length()-1;i>=0;i--){ reversed+=str.charAt(i); } System.out.println("The reversed string is "+reversed); } }