Question: Write a void method called palindromeCheck that takes NO argument. The method should have functionality to check whether or not the word is a palindrome

Write a void method called palindromeCheck that takes NO argument. The method should have functionality to check whether or not the word is a palindrome and print to the screen all of the palindromes, one per line. (java)

Write a void method called palindromeCheck that takes NO argument. The method

This program reads words, identifies, counts and writes all the palindromes and the total t palindrome count public static void palindromeCheck) String someword = "" ". int count = 0 int total = 0 // keeps track of Palindrome words only (define algorithm to count # of palindrome words / Counts the total number of lines read from the given text file System.out.println(" Enter some words separated by white space") // declare your Scanner object here Scanner keyboard new Scanner (System.in); // hint 1: Using keyboard.next() will only return what comes before a space // hint 2: Using keyboard.nextLine() automatically reads the entire current line for each word user enters while (keyboard.hasNext()) someWord = keyboard.next(); // store each word in a string variable and then do your operations / increment number of words as you read each one total++ // #1. Code your logic for how to determine if a word is Palindrome first, then complete # 2 System.out.println("total+someWord) // test // if encountered ENTER then close scanner stream and terminate keyboard.close(): /Ix is a variable for count and y is variable total // #2, print "There are x palindromes out of y words

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!