Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Java 3. Write a function to reverse a string: public static String reverse(String s) Hint: given a string s, s-'a'+s; will add the character 'a'
Java
3. Write a function to reverse a string: public static String reverse(String s) Hint: given a string s, s-'a'+s; will add the character 'a' to the front of the string. When writing these functions, do not print inside the function except for debugging. Return the string to be constructed and print where it's called. 3b. A "palindrome" is a string that reads the same forwards and backwards. For example, "noon" and "bob" aree function that determines if a string is a if it's a palindrome and false palindromes. Write a boolean palindrome (returns true otherwise): public static boolean palindrome(String s) Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started