Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Informix Database Administrators Survival Guide

Authors: Joe Lumbley

1st Edition

0131243144, 978-0131243149

More Books

Students also viewed these Databases questions