Page 1 of 1

O Main.java Write code that will take in a String input and check to see if it is a palindrome or not. 3 Main.java 1 imp

Posted: Sat May 14, 2022 6:34 pm
by answerhappygod
O Main Java Write Code That Will Take In A String Input And Check To See If It Is A Palindrome Or Not 3 Main Java 1 Imp 1
O Main Java Write Code That Will Take In A String Input And Check To See If It Is A Palindrome Or Not 3 Main Java 1 Imp 1 (45.48 KiB) Viewed 47 times
O Main.java Write code that will take in a String input and check to see if it is a palindrome or not. 3 Main.java 1 import java.util.Scanner; 2 class Main public static void main(String[] args) { Scanner inp = new Scanner(System.in); System.out.print("In:"); String s = inp.nextLine(); 8 //write your code below 3 4 A palindrome means that the characters are the same forwards and backwards, ignoring spaces. 5 6 7 Examples of palindromes: 9 racecar was it a car or a cat I saw 10 11 12 } never odd or even } • rats live on no evil star Your check should be case insensitive too. For example, "Bob" is a palindrome, despite the first B being capitalized | Your program will print out "true" if it's a palindrome and "false" if not. -