my dillema is i dont fully understand this assignment. I also dont know if my array should be inside of class or inside of the void setString method. help
import java.util.Arrays;
class String
{
//data members
private int SIZE = 25;
private [] myString = new array[25];
public void setString( String newString )
{
String[] setString = new String[newArray.length];
}
Write a class that performs similar operations as the Java String class.
Use only private data members and public methods.
Do NOT use any existing String methods from the Java String class in MyString implementations. The only
exception is the setString( ) method as described below
.
Data members:
array of 25 characters
size – current number of characters in the array
Methods:
void setString( String newString )
Stores newString into the array and sets the value of size. A maximum of 25 characters
can be stored. Use only String methods length( ) and charAt( ) to write this method.