any idea why this happens

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

You shouldn’t have return types on your constructors in EncodedString

Kev

Thanks Kev, been programming for 20 hours strait, at this point I am missing all of the elemntry stuff.