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
What is an example of a transition effectl
yawa3891 [41]
Well try finding out what transition effect means 
8 0
3 years ago
What is the best programing language to use for building video games?
Alexxandr [17]

hey

I'm going to college for game design.

one of the best languages and the one I'm studying in is c# it is used in unity and many other game engines but there are many more. Just to list a few c++, Java, and many more it is up to you. if you would like more info about this just let me know By the way what game are you planning to make that is one of the most important factors

Hope this helps

-scav

6 0
3 years ago
A type of touch screen that can be up to four feet by six feet is a(n) _____.
Llana [10]
Hi,

A type of touch screen that can be up to four feet by six feet is a(n) <span>multitouch interface.
</span>.
7 0
2 years ago
Read 2 more answers
He should identify his various
joja [24]

Answer:

false, that shouldn't be a a priority to identify if they are or not.

Explanation:

3 0
3 years ago
If a touch screen chrome is not charging what is wrong with it
AysviL [449]
Look it up on a best buy website ion know
5 0
3 years ago
Read 2 more answers
Other questions:
  • The purpose of a lockout tagout checklist is to​
    9·2 answers
  • Turning up the transmit power or utilizing a high gain antenna to reach wireless users from a distance increases your exposure t
    12·1 answer
  • The monkey-and-bananas problem is faced by a monkey in a laboratory with some bananas hanging out of reach from the ceiling. A b
    8·1 answer
  • Write a program that will generate 100 integers between 0 and 1000. Store the even numbers in a sorted linked list called evens.
    12·1 answer
  • What resources can be shared over a computer network?
    12·2 answers
  • 01110100 01101000 01101001 01110011 00100000 01110011 01110101 01100011 01101011 01110011 00100000 01100010 01100001 01101100 01
    12·2 answers
  • Please help ASAP!
    5·1 answer
  • What are the four steps for planning a table?​
    10·1 answer
  • What is phishing?
    14·1 answer
  • Providing captions and transcripts for videos on your website is a way of ensuring what?.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!