Question: 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
 Java 3. Write a function to reverse a string: public static

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!