title: Class that is extended from an abstract class toString method doesn't work :/
body: <p>This is the main demo class    </p>
  
  <pre><code>public class Ongoing{
  
    public static void main(String[] args){
  
      ExtendsAbstract josh = new ExtendsAbstract(5, "donkey");
  
      System.out.println(josh.toString());
  
  
  
    }
  
  }
  </code></pre>
  
  <p>this is the class extended from the abstract class, the one who's tostring method won't work. </p>
  
  <pre><code>public class ExtendsAbstract extends Abstract{
  
    private String t;
  
    public ExtendsAbstract(int y, String t){
      super(y);
      this.t = t;
    }
  
    public String getString(){
      return this.t;  
    }
  
    public int getInt(){
      return super.getInt();
    }
  
    public String toString(int y){
  
      return(/*super.toString(y)+*/"The integer is "+ y) ;
  
    }
  
  }
  </code></pre>
  
  <p>This is the abstract class</p>
  
  <pre><code>public abstract class Abstract{
  
    private int y;
  
  
    public Abstract(int y){
      this.y = y;
    }
  
    public int getInt(){
      return y;
    }
  
    public String toString(int y){
      return("The integer is :"+y);
    }
  
  
  }
  </code></pre>
  
  <p>Every time i try and access the toString method from the extended class it just prints out what i think is a memory address. I even didn't mess with the abstract class and it still did that, does anyone know why? Also another question about abstract classes, what advantages do they bring, is it just memory? Because you can't access private members from it so isn't it the same as a normal class, just more restrictions?</p>