OK I have 2 classes:
class EncodedString
{
private String value;
private String option;
private int baseN;
//the values are set only once when the EncodedString object is created
public void EncodedString(String value, int baseN, String option)
{
this.value = value;
this.option = option;
this.baseN = baseN;
}
public void EncodedString(String value)
{
}
//get methods
public String value()
{
return value;
}
public String option()
{
return option;
}
public int baseN()
{
return baseN;
}
}
and another class where I have the foolowing code
//input are
/* 1. sentence in the english language
1. base n
*/
public EncodedString encodeToString(String phrase, int baseN)
{
EncodedString encodedStr;
encodedStr = new EncodedString("12");
return encodedStr;
}
Now for some reason I get the foolowing error:
CompressionClassV1.java:115: cannot resolve symbol
symbol : constructor EncodedString (java.lang.String)
location: class EncodedString
encodedStr = new EncodedString("12");
^
1 error
Process completed.
I can instanciate the object if the constructor is empty, but if I try to pass values, I get this weird error. Anyone know why this is happening