Question: language is Java. Problem 1] Implement the following methods from the class String. You are allowed to use the method length and charAt from the
![language is Java. Problem 1] Implement the following methods from the](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f015b3b2934_22766f015b30b554.jpg)
language is Java.
Problem 1] Implement the following methods from the class String. You are allowed to use the method length and charAt from the class String. public static int[] indexOf(String s, charch) o If s does not contain the character ch, the method returns a reference to an integer array of length 1. In this case, the element of the array is assigned the value - 1. public static String[] split(String s, char ch) o If s does not contain the character ch, the methods returns the String s. 0 You can use the first method to find the location of the character ch. public static boolean equal(String s1, String s2) o The method returns true if the objects referenced by sl and s2 are identical
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
