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
nikdorinn [45]
3 years ago
6

Create a recursive method, a method that calls itself, that returns true or false depending on whether or not a given string is

a palindrome. A palindrome is a word that reads the same forwards and backwards, such as "tacocat". Task 2 – The Driver Now we just need to call our method from our Main method and test it with a few different inputs (they may be hardcoded or from user input). Print out the results of each of the method calls along with the string that it was searching through. ∃ Some Sample Output: Received "tacocat" which is indeed a palindrome. Received "lol" which is indeed a palindrome. Received "" which is indeed a palindrome. Received "catermelon" which is not a palindrome.
Computers and Technology
1 answer:
ICE Princess25 [194]3 years ago
6 0

Answer:

public class CheckPalindrome{

public static boolean IsPalindrome(String str){

if(str.Length<1)

{

return true;

}

else

{

if(str[0]!=str[str.length-1])

return false;

else

return IsPalindrome(str.substring(1,str.Length-2));

}

}

public static void main(string args[])

{

//console.write("checking palindromes");

string input;

boolean flag;

input=Console.ReadLine();

flag= IsPalindrome(input);

if(flag)

{

Console.WriteLine("Received"+input+"is indeed palindrome");

}

else

{

Console.WriteLine("received"+input+"is not a palindrome");

}

}

Explanation:

You might be interested in
Help please and thank you :)
Fynjy0 [20]
Answer:First one net is the answer ........
5 0
3 years ago
Which statement is correct about operating systems? They are hardware devices. They include programs that help people do certain
katrin2010 [14]
<span>They include programs that help people do certain tasks. They include programs that control a computer. They store information being used by the CPU.</span>
3 0
3 years ago
Briefly describe the software quality dilemma in your own words
Dahasolnce [82]

Answer:

 software quality dilemma is a situation where there is confusion regarding what should we prioritize : a good quality work or a fast paced work. In software development , many a times there will be deadlines to achieve, in such cases software quality dilemma is bound to occur. A developer would have to choose between writing and optimized and well commented code or just get the job done without proper optimized or reviews. In same lines, many companies have to decide between regular reviews and expert opinions of a product for good software quality or bypass them to meet budgets and deadlines.

6 0
3 years ago
When should you try to photograph reflections on bodies of water?
Wewaii [24]

Answer:  C. although a rainy day (A) would make it more aesthetic

6 0
3 years ago
30 points!! What should I do if I plug my computer in and it starts making noises and sounds and it starts smelling.
soldier1979 [14.2K]

Answer:

ummmm, you are probably overusing it or it's too old.... if it's an apple computer you can look at the activity monitor and check the activity usage on it because if the activity usage is really high you should probably shut it off and let it chill out for a bit...

6 0
3 years ago
Other questions:
  • Ten 9600-bps lines are to be multiplexed using TDM. a. Ignoring overhead bits in the TDM frame, what is the total capacity requi
    6·1 answer
  • Which OS, in your opinion, manages multiprocessing in the most efficient manner?
    14·1 answer
  • Which type of address defines a single network interface in a computer or other device?
    7·1 answer
  • Which option will enable Mina to apply several formats to the spreadsheet cells at the same time?
    5·1 answer
  • Why would you use a billeted list in a slide presentation?
    11·1 answer
  • Respecting yourself and others, educating yourself and connecting with others, and protecting yourself and others are all aspect
    11·1 answer
  • Why we call the standard deviation of the sample statistic asstandard error of the statistic?
    14·1 answer
  • Write the definition of a function isSenior, that receives an integer parameter and returns true if the parameter's value is gre
    13·1 answer
  • In which of the following phases of filmmaking would a production team be focused on the
    10·2 answers
  • The IPv6 address for an Ethernet connection begins with FE80::/64. What does this tell you about the address
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!