*should be written in java. Can someone answer and explain whatyou did so I can understand this better?
Write Methods for String Manipulation
Description:
Design two methods to check the prefix and suffix ofstrings.
Write a method to check prefix of two strings that have morethan 3 characters. A 3-char prefix of a word “class” will be “cla”.The method should take two strings as parameters, then compare3-char prefix of two strings.
Write a method to check suffix of two strings that have morethan 3 characters. A 3-char suffix of a word “world” will be “rld”.The method should take two strings as parameters, then compare3-char suffix
OR
OR