

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Information about a java quiz question from cmsc131 fall 2004. Students are required to write a static java method named 'palindrome' that returns a boolean value indicating whether a given character array represents a palindrome or not. A palindrome is a word that reads the same backwards as forwards. The method should be public, static, and have a boolean return type with a char array (char[] word) as its parameter.
Typology: Quizzes
1 / 3
This page cannot be seen from the preview
Don't miss anything!


CMSC131 Fall 2004 Quiz #5, Duration 20 Minutes
First Name: Last Name: Student Id: Section time (10am/11am): TAs:
Problem Description
Write a static Java method called palindrome that returns true if a character array represents a palindrome and false otherwise. A palindrome is a word that reads the same backwards as forwards. For example, the following words are considered palindromes:
racecar mom
The palindrome method is a public static method with boolean as return type and with a character array (char[] word) as parameter. You do not need to provide a class declaration or a main method, just the method.
WRITE YOUR IMPLEMENTATION ON THE NEXT PAGE