Reverse the string
Anónimo
import java.util.*; public class Reverse { public static void main(String[] args) { System.out.println("Enter the word"); Scanner sc=new Scanner(System.in); String word=sc,nextLine(); String eeverse=""; for(int i=word.length()-1;i>=0;i--) { reverse=reverse+""+charAt(i); } System.out.println(reverse); } }