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
Error messages begin with the ____ symbol.
Zarrin [17]
Error messages begin with the # (hashtag) symbol.
8 0
3 years ago
Read 2 more answers
Summarize the five stages of cultural shock
Anton [14]
1. Honeymoon stage
2. Distress and anxiety
3. Adjustment
4. Adaption
5. Re-entry shock
8 0
3 years ago
Read 2 more answers
What are rules that enforce basic and fundamental information-based constraints?
irga5000 [103]
The
answer should be C.
8 0
3 years ago
Why do so many people think the revision stage is the hardest
tia_tia [17]

It is because many people want to be perfect just at the start, but there is always room to improvement, but people don't accept that, so they don't want to be better than what they are already, so the don't revise themselves or anything.


6 0
3 years ago
Read 2 more answers
The next few questions will be based on interpretations of a topographic map from East Brownsville, TX. To answer these question
11111nata11111 [884]

Answer:

a. Youthful

Explanation:

The river gets its water from youth stage fluvial water. The river meanders from side to side. East Brownsville will be less stable in international boundary in terms of physical position on the landscape because its base level drops.

8 0
3 years ago
Other questions:
  • Failure to verify information can lead to?
    10·1 answer
  • For the following array x [10] = { 45, 20, 50, 30, 80, 10, 60, 70, 40, 90} show the contents of x after the function call split
    6·1 answer
  • Which should you use to find a saved file?
    15·2 answers
  • What are expansion cards used for?​
    9·2 answers
  • Assume you're using a three-button mouse. To access shortcut menus, you would
    9·1 answer
  • What areas do you need to grow your knowledge in to understand your financial future?
    12·1 answer
  • A software update is also referred to as what?
    15·2 answers
  • Why do certain words change color in Python?
    6·1 answer
  • ¿En qué año se funda lego?
    5·1 answer
  • Brain for free 12628397
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!