@@ -0,0 +1,2331 @@
+/** A program that reads through a dictionary of words and finds the longest%0A *  word that is a palindrome. Any text file containing one word per line can %0A *  used.%0A */%0A%0Apackage findpalindromes;%0A%0Aimport java.util.Scanner;%0Aimport java.io.FileInputStream;%0Aimport java.io.FileNotFoundException;%0A/**%0A *%0A * @author k8port%0A */%0Apublic class FindPalindromes %7B%0A    /** Method to test if word is a palindrome. Palindromes are %0A     *  even length words where the first half mirrors the second half.%0A     * @param word the word to test for palindrome condition%0A     * @return true if word is a palindrome.%0A     */%0A    public static boolean isPalindrome(String word) %7B%0A        boolean isPalindrome = true; // assume not a palindrome %0A        int length = word.length();%0A        if (length %25 2 != 0)   // check for even length word%0A            isPalindrome = false;%0A        else %7B%0A            char a, b;%0A            for (int i = 0, j = length-1; i %3C j; i++, j--) %7B%0A                a = word.charAt(i);%0A                b = word.charAt(j);%0A                if (a != b)%0A                    isPalindrome = false;%0A            %7D%0A        %7D%0A        if (isPalindrome) %7B%0A            System.out.println(%22Palindrome: %22 + word);%0A        %7D%0A        return isPalindrome;%0A    %7D%0A    %0A    /**%0A     * @param args the command line arguments%0A     */%0A    public static void main(String%5B%5D args) %7B%0A        %0A        // instance variables%0A        Scanner scan;%0A        int max = 0; // the length of the longest word that is a palindrome%0A        String word; // the current word being examined%0A        String result = %22No Palindromes%22; // the longest word that is a palindrome%0A        %0A        // read file%0A        try %7B%0A            scan = new Scanner(new FileInputStream(%22words.txt%22));%0A            while (scan.hasNext()) %7B%0A                word = String.valueOf(scan.nextLine()); %0A                if (FindPalindromes.isPalindrome(word)) %7B%0A                    if (word.length() %3E max) %7B%0A                        result = word;%0A                        max = word.length();%0A                    %7D%0A                %7D%0A            %7D%0A            System.out.println(%22Longest palindrome in the dictionary is: %22 + result);%0A        %7D catch (FileNotFoundException e) %7B%0A            System.out.println(%22File Not Found%22);%0A            System.exit(0);%0A        %7D%0A        %0A        %0A    %7D%0A    %0A%7D%0A

Create FindPalindromes.java