Question: i want this java language Write a method that takes a sequence from a user and returns True if the sequence is a palindrome. (An

i want this java language

i want this java language Write a method that takes a sequence

Write a method that takes a sequence from a user and returns "True" if the sequence is a palindrome. (An array that is equal to its reverse is called a palindrome, such as 161, 35053, madam, civic and kayak. If you reverse any of the sequences or the words they stay the same.) You should define 2 methods: 1. Method readuserSequence () Create an array of int type with length of 20 entries. Fill the array with the user data. The user can inter any number of items up to 20 only. The created array must be returned in order to be used by the following method. 2. Method ispalindrome (int[] OriginalArray) The purpuse of this method is to returns "True" if the array is a palindrome and false if otherwise. Write a test program that call readuserSequence () method to read user data, then pass it to the isPalindrome () method. If the user's sequence is palindrome then display "Your sequence is palindrome.", if not then display "Your sequence is not palindrome." Here is the sample run of the program: Please enter a sequence of numbers: 35053 Your sequence is palindrome

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!