title: Palindrome, arraylist,
body: <p>Check if the word is a palindrome or not. If palindrome, store the letters in an arraylist.
  Remove all the vowels in the arraylist and store in another arraylist. Output all the vowels. If not palindrome, return 
  the program.        </p>
  
  <pre><code>import java.util.*;
      class Palindrome
      {
        public static void main(String[] args) 
        {
          ArrayList&lt; String &gt; words = new ArrayList&lt; String &gt;();
          Scanner scan = new Scanner(System.in);    
          while(scan.hasNext())     
             words.add(scan.next());
          System.out.println("Is it a palindrome? " +
                isPalindrome(words));
        }
        static boolean isPalindrome(ArrayList&lt; String &gt; w)
        {
         int front  = 0, back = w.size() - 1;
         while( front &lt; back)
           if (!w.get(front++).equals(w.get(back--)))
              return false;
          return true;
        }
      }
  </code></pre>
  
  <p>I have a code for Palindrome but I am not quite sure what the question wants and I have no idea on how to answer the question. Can anybody give me an answer or a hint that I can easily understand? Honestly, I don't know how to start this. I'm quite new to this. </p>
  
  <hr>
  
  <pre><code>package stackoverflow;
  
  import java.util.ArrayList;
  
  public class PalindromeWierd {
      public static void main(String[] args) {
          ArrayList&lt;Character&gt; palim = new ArrayList&lt;Character&gt;();
          palim.add('b');
          palim.add('c');
          palim.add('d');
          palim.add('f');
          palim.add('g');
      palim.add('h');
      palim.add('j');
      palim.add('k');
      palim.add('l');
      palim.add('m');
      palim.add('n');
      palim.add('p');
      palim.add('q');
      palim.add('r');
      palim.add('s');
      palim.add('t');
      palim.add('v');
      palim.add('w');
      palim.add('x');
      palim.add('y');
      palim.add('z');
          System.out.println("Palim with vowels: ");
          for (Character character : palim) {
              System.out.print(character);
          }
          System.out.println();
  
          ArrayList&lt;Character&gt; palimWithoutVowels = new ArrayList&lt;Character&gt;();
          for (Character character : palim) {
              if (character != 'a' &amp;&amp; character != 'e' &amp;&amp; character != 'i'
                      &amp;&amp; character != 'o' &amp;&amp; character != 'u') {
                  palimWithoutVowels.add(character);
              }
          }
          System.out.println("Palim without vowels: ");
          for (Character character : palimWithoutVowels) {
              System.out.print(character);
          }
          System.out.println();
  
      }
  }
  </code></pre>