Hello very good I have a main that calls a method to show the content of an object on the screen, the main is this:
class Main
{
/**
* main method
* @param args arguments
*/
public static void main(String args[])
{
//Create a result
Result R = new Result("Ra.one",12,93,84);
//display a result
R.display();
}
}
What I do in that method to prove that it's all right is to get a message on the screen and it does not return anything ... I do this:
public String display() {
StringBuilder sb = new StringBuilder();
sb.append("Hola que tal como estamos " );
return sb.toString();
}
He does not return anything to me, I do not understand why. The Display method wants me to behave like a toString.