Question: java Write a method delete that takes two strings, str and substr, as parameters. The method will return a string which includes each character in

java
java Write a method delete that takes two strings, str and substr,

Write a method delete that takes two strings, str and substr, as parameters. The method will return a string which includes each character in str but has the first occurrence of substr deleted. public static String delete (String str, String substr) Calling delete ("Labyrinthine", "in") will return "Labyrthine" Write a method that takes one string as a parameter and returns a string with each letter duplicated. Letters will appear in the same order as in the parameter. public static String duplicate (String s) Calling duplicate ("Mango") will return the String "Maannggoo" Write a method to change the name format from lastName>, to sfirstName> public static String name (String s) Calling name ("Siddiqi, Wafa") will return "Wafa Siddiqi". Write a method to check if a word is a palindrome. A palindrome is a word that spells the same forward and backward. For example "dad", "civic" and "radar". public static boolean isPalindrome (String str) Calling is Palindrome ("rotator") will return true. Calling is Palindrome ("Baba") will return false Test your program with the words: malayalam, hannah, rotator, repaper and any other non-palindrome words

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!