Output of Objects
An object o is �converted to a string� by method o.toString()
Every object has a default definition of toSting()
System.out.println( rA );
// output: something cryptic
A class can redefine toString:
public String toString(){
. . .
return expression;
}
Previous slide
Next slide
Back to first slide
View graphic version