Please help with coding from a beginner's computer sci. class (Language=Java)

Assignment Details=

Create a class called Palindromes, which will determine if a user’s entry is a palindrome. A
palindrome is a word or phrase that reads the same backward or forwards. See the examples.
A Santa at NASA My gym taco cat kayak NOW I WON race car
Your program will ignore spaces and ignore cases when determining if a string is a palindrome.
Use the String method replace to remove the spaces. If it is a palindrome, the output
PALINDROME, or else output NOT PALINDROME.
Additional requirements:
 Add an infinite loop with a sentinel-trigger break test (allowing them to input multiple
attempts). You may decide on its command word or exit condition.
 As below, make sure a spacer line exists between each run of the program
Here are two sample runs of the program.
Enter a word or phrase: Noon
PALINDROME
Enter a word or phrase: bookkeeper
NOT PALINDROME