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
Which of these is an effective color scheme?
irga5000 [103]

Answer:

Yellow on white.

Explanation:

Not to bright, soft, and easy to see.

4 0
3 years ago
Which of the following statements represents a scientific bias?
valina [46]

Answer: Use data from the previous steps because they show better results

Explanation:

A scientific bias occurs when there's a deviation between the observations of a researcher and the accurate representation of data and results.

In this case, the use of data from the previous steps because they show better results will bring about a data bias as it'll lead to inaccuracies of the data being represented.

5 0
3 years ago
It is possible to collaborate on a presentation with a group of people using the Internet.
DerKrebs [107]

Answer:

True

Explanation:

4 0
4 years ago
A multinational pharmaceutical company used a saffron trident in a promotional campaign for one of its drugs in India. The saffr
Vera_Pavlovna [14]
Answer : Encoding

Explanation : Encoding refers to correctly coding the message so that the receiver gets the clear message without feating any misunderstanding.
5 0
3 years ago
What is the by stander effect
nignag [31]

Answer:

The bystander effect is a theory that people are less likely to help if there are others around.

hope this helped :D

4 0
3 years ago
Other questions:
  • What will be displayed after the following statements have been executed? int x = 15, y = 26, z = 32; x = x + 12; y = y/6; z -=
    15·1 answer
  • Your desktop, Internet Explorer®, and the Media Player can be started from this area on most computers.
    10·2 answers
  • 4+4 act quick for brainliest
    10·2 answers
  • Which class of fire extinguisher is appropriate for a fire involving electrical/energized electrical equipment?
    13·2 answers
  • When an attacker promotes themselves as reputable third-party advertisers to distribute their malware through the Web ads,
    15·1 answer
  • When it comes to the best possible security for your wireless router, be sure to use WEP encryption to ensure that your transmis
    14·1 answer
  • Raw materials have two basic types what are the 2?
    11·2 answers
  • List and briefly describe the major types of system in organization?​
    15·2 answers
  • Which of the following media forms is the Federal Communications Commission able to regulate content on?
    12·1 answer
  • PART 2 - Exercise 2 - Programming Assignment
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!