0
메소드 호출시 메소드를 어떻게 기술 할 수 있습니까? getInstance의 프로토 타입은 getInstance (Properties, Authenticator)입니다. Authenticator 대신에 메소드가 작성됩니다. 이런 종류의 문제에 대한 해결책을 찾을 수있는 장소를 제안하십시오.메소드 호출
Session session = Session.getInstance(props,
new javax.mail.Authenticator() {
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
이것은 'Authenticator' 추상 클래스의 익명 구현입니다. 당신의 질문은 정확히 무엇입니까? – Mureinik