I am trying to understand what the code below is doing, i know the functions of a string buffer, however am finding it difficult to interprete the aim of the code below. Hope someone can help me?
public string tostring(){
stringBuffer sb=new StringBuffer(28 );
sb.append("move [x: ");
sb.append(x);
sb.append("; y: ");
sb.append(y);
sb.append(";val : ");
sb.append(getVa l());
sb.append("] ");
return sb.string();
}
public string tostring(){
stringBuffer sb=new StringBuffer(28 );
sb.append("move [x: ");
sb.append(x);
sb.append("; y: ");
sb.append(y);
sb.append(";val : ");
sb.append(getVa l());
sb.append("] ");
return sb.string();
}
Comment