package p; //toString can't be renamed - it's a special case (it's called implicitly) class A{ public String toString(){ return null; }; }