Explore BrainMass

Explore BrainMass

    JAVA Programming code

    Not what you're looking for? Search our solutions OR ask your own Custom question.

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    Write a program in Java to process a 3-digit palindromic number. A palindromic number is any number which has the same value when read from either direction. The way to solve the problem (by hand) is as follows:

    Object Basics and Simple Data Objects
    - Write down any 3-digit number.
    - Reverse the digits in the original number and write them under the original number.
    - Add the two numbers.
    - If the number is a palindrome, stop.
    - If the number is not a palindrome, reverse the digits of the sum and write them under the sum.
    - Add these two numbers.
    - Repeat this process until you get a palindrome.
    - The number of times that you had to add in order to reach the palindrome is the palindrome order of your original number.

    © BrainMass Inc. brainmass.com November 29, 2021, 11:54 pm ad1c9bdddf

    Solution Preview

    Clue 1: Consider the number as a string to check if it is a plaindrome.

    Clue 2: You may use the equals and substring methods of the String class. ...

    Solution Summary

    JAVA programming code help is provided.