subject

IN JAVAHW4_P2 - MyStringThe String class is provided in the Java library. Provide your own implementation for the following methods (name the new class MyString):DO NOT USE THE STRING OBJECT AND ITS METHODS. IMPLEMENT THEM ALL AGAIN YOURSELF!**You can use char[] and Character object. public MyString(char[] chars);public char charAt(int index);public int length();public MyString substring(int begin, int end);public MyString toLowerCase();public boolean equals(MyString s);public static MyString valueOf(int i);public char[] toChars();Use the following class driver with no modifications to it!import java. util.*;import java. lang.*;import java. io.*;class DriverMain{public static void main(String[] args) {MyString s1 = new MyString(new char[] {'A', 'B', 'C'});System. out. println(s1.length());System. out. println(s1.charAt(1));MyString s2 = s1.substring(0,2);System. out. println(s2.toLowerCase().equals(new MyString(new char[] {'a', 'b'})));char[] chars = MyString. valueOf(345).toChars();for (int i = 0; i < chars. length; i++) {System. out. print(chars[i]);}}}---And use the following class that was refered to in mainclass MyString { public MyString(char[] chars){ }public char charAt(int index){ }public int length(){ }public MyString substring(int begin, int end){ }public MyString toLowerCase(){ }public boolean equals(MyString s){ }public static MyString valueOf(int i){ }public char[] toChars(){ } }PLEASE follow the instructions that are provided and comment the code so I can understand it better!I'm really confused about this assignment and need as much help as possible!

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 20:00
What statement best describes operating systems? it’s possible for modern computers to function without operating systems. most operating systems are free or very inexpensive. operating systems are managed by the computer’s microprocessor (cpu). operating systems manage the computer’s random access memory (ram).
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
Light travels at a speed of 186,000 miles a second. the distance light travels in a year is 5,865,690,000,000 miles/year 5,865,695,000,000 miles/year 58,656,950,000,000 miles/year 6,789,000,0000 miles/year
Answers: 1
question
Computers and Technology, 23.06.2019 13:00
Which one of the following voltages should never be measured directly with a vom? a. 1200 v b. 500 v c. 800 v d. 100v
Answers: 2
question
Computers and Technology, 23.06.2019 17:00
The more powerful, 60 volt cables and the main power shut off on an hev are both colored orange
Answers: 1
You know the right answer?
IN JAVAHW4_P2 - MyStringThe String class is provided in the Java library. Provide your own implement...
Questions
question
English, 30.06.2019 14:00
Questions on the website: 13722359