that's a nice basic stack.
Turn your string into an array of char, feed those into the stack, then pop them while looping backwards through your char array.
If each pair match you have your palindrome, as soon as something doesn't match you know it's not a palindrome.
The shortest solution in Java I can come up with is
String str = "eye";
System.out.println(str + " is " + (!str.equals((new StringBuilder(str)).reverse().toString())?"not ":"" + " a palindrome");
but that obviously doesn't match your requirements (and try to explain it to your teacher ;) ).