[BAEL-6859] inner sub classes (#14631)
* [BAEL-6859] inner and sub classes * [BAEL-6859] unit test cases added * [BAEL-6859] usage of inner class in outer class * [BAEL-6859] usage of inner class in outer class --------- Co-authored-by: Bhaskar <bhaskar.dastidar@freshworks.com>
This commit is contained in:
parent
c62680becb
commit
de6d040193
|
@ -1,11 +1,12 @@
|
|||
package com.baeldung.subclassinnerclass;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
public class EmailNotifier extends Notifier {
|
||||
@Override
|
||||
void notify(Message e) {
|
||||
// Provide email specific implementation here
|
||||
// connect to the email connector
|
||||
EmailConnector emailConnector = new EmailConnector();
|
||||
emailConnector.connect();
|
||||
// send email
|
||||
}
|
||||
|
||||
// Inner class for email connection
|
||||
|
@ -13,5 +14,9 @@ public class EmailNotifier extends Notifier {
|
|||
private String emailHost;
|
||||
private int emailPort;
|
||||
// Getter Setters
|
||||
|
||||
private void connect() {
|
||||
// connect to the smtp server
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue