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 one of the following analog VOM ranges would be selected to measure a DC
tensa zangetsu [6.8K]
<span>100 mA of course. You cannot use 10 mA because it will be over the range and the higher ranges are not accurate at 90 mA</span>
7 0
3 years ago
NEED HELP NOW 66 POINTS WILL MARK BRAINLIEST!! For the independent reading all you have to do is pick a grade six book that you
nlexa [21]
1a
2a
3b
4d
5c
6d
7b
8c
9a
10c
6 0
3 years ago
kate decides to download an extension to her favorite browser to quickly store links on her spreadsheet software. while download
uranmaximum [27]

By ignoring the opt-out check box that allows the extension to download a search toolbar, the error which has occurred here is that: d. Kate has installed a potentially unwanted program (PUP).

<h3>What is a software?</h3>

A software can be defined as a set of executable instructions that is typically used to instruct a computer system on how to perform a specific task (function) and proffer solutions to a particular problem.

<h3>What is a potentially unwanted program (PUP)?</h3>

A potentially unwanted program (PUP) can be defined as a piece of software that's bundled into download packages and may be unwanted by the end user because it offers no benefits or may pose high risk.

In this scenario, we can reasonably infer and logically deduce that the error which has occurred here is that Kate has installed a potentially unwanted program (PUP) because she ignored the opt-out check box which then allowed the extension to download a search toolbar.

Read more on potentially unwanted program here: brainly.com/question/25091456

#SPJ1

Complete Question:

Kate decides to download an extension to her favorite browser to quickly store links on her spreadsheet software. While downloading the software, she ignores the opt-out check box that allows the extension to download a search toolbar.

What has occurred here?

a. Kate has installed an injection.

b. Kate has installed a backdoor.

c. Kate has installed a Trojan.

d. Kate has installed a potentially unwanted program (PUP).

4 0
1 year ago
Agent Hunt is transferring classified files from the CIA mainframe into his flash drive. SSS represents the size of the files on
stiv31 [10]

Answer:

The size on the drive before the transfer is 45 megabytes

Explanation:

Before transfer, t which is the time in seconds is 0. Therefore given the formula: S = 5t + 45,

substituting t into the formula gives;

S = 5(0) + 45

S = 0 + 45

S = 45

7 0
3 years ago
True/false: the cause of failure in a computer program is often due to more than one factor
kozerog [31]
True of course the computer is a big electronic
7 0
3 years ago
Read 2 more answers
Other questions:
  • What does LMS Date Updated mean?
    9·1 answer
  • While working on a group project, you notice something does not look right in the presentation. You call a meeting with your tea
    14·2 answers
  • Which is most harmful computer virus define​
    15·1 answer
  • When a hardware or software interrupt occurs, the CPU calls________
    14·1 answer
  • A package that includes hardware, software, and support from a single vendor is called a(n ____ package.
    6·1 answer
  • . Write a swift programming code to perform following tasks a) Declare a variable that stores the age of a person b) Declare a c
    5·1 answer
  • How do u set up a Wi-Fi network on Android ​
    5·1 answer
  • Time shifting occurs when
    8·2 answers
  • Which of the following would be least effective?
    10·1 answer
  • Cho lược đồ CSDL “Quản lý BÁN HÀNG” có các bảng như bên dưới. (Thuộc tính in đậm và
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!