We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Java
- Strings
- Java String Reverse
- Discussions
Java String Reverse
Java String Reverse
Sort by
recency
|
1934 Discussions
|
Please Login in order to post a comment
That’s a great challenge to practice string manipulation in Java! The Prepare Java Strings – Java String Reverse problem on HackerRank is simple yet effective for building a strong foundation! Dental clinic near me
Scanner sc=new Scanner(System.in); String A=sc.next(); /* Enter your code here. Print output to STDOUT. */ int len =A.length(); String rev="";
import java.io.; import java.util.;
public class Solution { public static void main(String[] args) { Scanner sc=new Scanner(System.in); String A=sc.next();
String revA = new StringBuilder(A).reverse().toString(); if (A.equals(revA)) { System.out.println("Yes"); } else { System.out.println("No"); } } }
public static void main(String[] args) {
}