1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
OLEGan [10]
3 years ago
7

Complete the below method, isPalindrome(), that takes in a String and returns a boolean. The boolean should be true if the Strin

g is a palindrome, i.e., the String is the same if read forwards or in reverse. For example, "racecar" is a palindrome. The method should return false if the String is not a palindrome. Note: any single-letter word is considered a palindrome.
public class StringMethod {
public static boolean isPalindrome(String word) {
//TODO: Complete this method

}
}
Computers and Technology
1 answer:
Salsk061 [2.6K]3 years ago
5 0

Answer:

public static boolean isPalindrome(String word) {

   //TODO: Complete this method

   String reverse = "";  

       for (int i = (word.length()-1); i>=0; i--) {

           if(word.charAt(i)!=' '){

               reverse+=word.charAt(i);

           }

       }

   String without_space = word.replaceAll(" ", "");

   

   return reverse.equals(without_space);

   }

You might be interested in
To achieve the maximum confidentiality and integrity found in a completely secure information system would require that the syst
fgiga [73]

Answer:

The answer is "Option a".

Explanation:

Privacy is a set of rules, which limiting access to the data, and integrity ensures impartiality, accuracy, and reliability is assured to ensure, which authorized persons can have secure access to the data.

The system needs no access for everyone to achieve its secrecy and integrity contained in a completely safe data system, that's why the given statement is "true".

5 0
3 years ago
A poem for coduction
Nataly_w [17]
I don't know if you want a poem about conduction but if so here ya go

no matter how the heat
different temperatures meet
hot to cold how it's done
4 0
4 years ago
Read 2 more answers
Which statement is true about digital footprints?
RUDIKE [14]

Answer:

all of the above.

Explanation:

Your digital footprint is a sum total of the digital activity carried out by you while online. This generates a lot of data about you and is potentially permanent. Once generated it is very difficult to alter it and you are not in control of the data that has been generated. The digital footprint can be used to profile your behavior and has privacy related implications. So it is very important to be conscious of your digital footprint while working online.

5 0
3 years ago
How to get the blade out of a pencil sharpener?
agasfer [191]
Poke hole with thin but strong object
Or buy new sharpener
7 0
4 years ago
Laura is confused with the spelling of the word pronunciation. She types the word as pronounciation. Which feature of the Autoco
alexgriva [62]
The answer could be A..... replace
3 0
4 years ago
Read 2 more answers
Other questions:
  • Mention five features of word processing application​
    10·1 answer
  • A base class named Garden contains a private field width and a property public int Width that contains get and set accessors. A
    11·1 answer
  • Write a loop statement to count and display the number of positive integers in the array. That is, your loop should display the
    14·1 answer
  • If you wanted to round $3.99 located in Cell B3 to the nearest dollar, what is the correct Microsoft excel formula?
    6·2 answers
  • The source code of a java program is first compiled into an intermediate language called java ____, which are platform-independe
    8·1 answer
  • Let’s define a new language called dog-ish. A word is in the lan- guage dog-ish if the word contains the letters ’d’, ’o’, ’g’ a
    6·1 answer
  • Which of the following are the dimensions of feasibility? Group of answer choices cost, schedule, technical, and organizational
    14·1 answer
  • I NEED HELP ASAP
    8·1 answer
  • Where do animators work?
    8·1 answer
  • The welcome screen of the program 123D consists of ___
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!