/* This is my hello program */ import java.io.*; class Pall { String palendrum,pal; StringBuffer paltest,backwards; boolean ispal; //Pall() //{ // palen.getpal(); // palen.removejunk(); //} public static void main (String pal[]) { Pall palen =new Pall(); palen.getpal(); palen.removejunk(); palen.palcheck(); palen.$printpal(); } void getpal() { System.out.println("Type in your palendrum."); palendrum=ScreenIO.getString(); } void removejunk() { pal= palendrum.toUpperCase(); paltest =new StringBuffer(pal); for(int i=0;i'Z') { paltest.deleteCharAt(i); i--; } } } void palcheck() { String bwards; StringBuffer backwards; bwards=new String(paltest); backwards= new StringBuffer(bwards); backwards.reverse(); int x=paltest.length(); backwards.setLength(x); ispal =true; //if(paltest.equals(backwards)) ispal = true; // else ispal=false; System.out.println(""+ispal+paltest+backwards); } void $printpal() { System.out.println(""+paltest); if (ispal == true) System.out.println("Good, this is a palendrum!"); else System.out.println("Sorry, this is not a palendrum."); } }