You are viewing a single comment's thread. Return to all comments →
This is a simple code with Java 15 :
public static void main(String[] args) {
Scanner sc = new Scanner(System.in); String input = sc.next(); String output = ""; for(int i = 0; i<input.length(); i++){ output = input.charAt(i) + output; } if(input.equals(output)){ System.out.println("Yes"); }else{ System.out.println("No"); } }
Seems like cookies are disabled on this browser, please enable them to open this website
Java String Reverse
You are viewing a single comment's thread. Return to all comments →
This is a simple code with Java 15 :
public static void main(String[] args) {