Java Quiz: Writing a Palindrome Checking Method, Quizzes of Computer Science

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

Pre 2010

Uploaded on 07/30/2009

koofers-user-r6z
koofers-user-r6z 🇺🇸

10 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
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
pf3

Partial preview of the text

Download Java Quiz: Writing a Palindrome Checking Method and more Quizzes Computer Science in PDF only on Docsity!

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