Question: please use java and provide the code. Dont copy others because they dont have the substring method. The String class is provided in the Java
The String class is provided in the Java library. Provide your own implementation (name the new class MyString2) with one data field, array of characters, and the following methods: public MyString2(String s); constructor public String getArray();return the data field as a String. public MyString2 substring(int begin); create a new string starts at begin and return it. public MyString2 toUpperCase(); convert all characters in a string to uppercase and return it. public static MyString2 valueOf(boolean b); convert b value to string and return it. Do not use any method from String (you can use length), StringBuilder, or StringBuffer
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
