package javapkg; public class J { String defaultMethod() { return "foo"; } public String toString() { return "JavaClass: "+defaultMethod(); } }