import java.util.Scanner;
public class Homework
{
static String aString;
public Homework()
{
}
public static void Check(String args[])
{
Scanner s = new Scanner(System.in);
aString=s.next();
boolean palinder;
palinder=true;
for(int i=0;i!=aString.length()/2;i++)
{
if (aString.charAt(i)!=aString.charAt(aString.length()))
{
System.out.println("The word "+aString+" isn't a palinder");
palinder=false;
}
}
if (palinder)
{
System.out.println("The word "+aString+" is a palinder");
}
}
}
I wrote this program which is supposed to determine whether a word is a palinder or not, but the problem is that when I launch it in blueJ the program won't load, its like I looped. I can't figure out what did I write wrong.