Course Solutions Uncategorized (Solved) : Please Help Convert Program Use Arraylist Input Words Check Palindrome Continue Run User E Q36308566 . . . .

(Solved) : Please Help Convert Program Use Arraylist Input Words Check Palindrome Continue Run User E Q36308566 . . . .

 

Please help me convert this program to use ArrayList to inputwords to check if they are palindrome??

it will continue to run until the user enters a blank line?also, it will print out how many palindromes were found.

import java.util.ArrayList;
import java.util.Scanner;
public class ProjectProblem2 {

  
public static void main(String[] args) {
ArrayList <String> nameList = newArrayList<String>();
  
String [] testString = {“Able was I ere I saw Elba”,
“A Man, A Plan, A Canal, Panama”,
“Desserts I stressed”,
“Kayak” };
  
for (int i =0; i < testString.length; i++)
{
System.out.print(“””+ testString[i] +”””);
  
if (isPalindrome(stripString(testString[i])))
{
System.out.println(“is a palaindrome”);
}
  
else
{
System.out.println(“is not a palindrome”);
}
}
  
}
  
public static String stripString (String strip)
{
strip = strip.toUpperCase();
String stripped = “”;

for (int i = 0; i

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post