我认为 Authenticator应该是一个借口, new Authenticator当然会生成一个类了,
new Authenticator() {
public PasswordAuthentication
getPasswordAuthentication()
{
return new PasswordAuthentication(username, password);
}
这个是一个类,但是没有类名,这个叫做匿名内部类吧,
建议你去下载一份java API文档,要自己学会查文档,里面应有尽有