Frage im Vorstellungsgespräch bei Cognizant

Write a java program for palindrome cheking. Printing a pyramid with *