Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Palindrome {
- public static void main(String[] args) {
- String txt = String.join("", args);
- String rvrs = new StringBuffer(txt).reverse().toString();
- String answ = new StringBuffer(String.join(" ", args)).reverse().toString();
- if(txt.toLowerCase().equals(rvrs.toLowerCase())){
- System.out.print("Yes, this is a palindrome!");
- } else System.out.print("Where did you find a palindrome here, you dumbass? "+answ);
- }
- }
Add Comment
Please, Sign In to add comment