Hi, I get the following error when I go to compile my test class:
This is my tester code (obviously no where near complete):Quote:
cannot find symbol - constructor MyString(java.lang.String,int)
This is my constructor:Code:public class TestMyString
{
public static void main(String[] args)
{
MyString myString1 = new MyString("a", 1);
}
}
Everything I've tried has failed so I've come here for help:wave:Code:public MyString(char array, int length)
{
//constructor creates new char array
data = new char[length];
for (int i = 0; i < length; i++)
{
data[i] = array;
}
}
