Community
Participate
Working Groups
Having a interface 1 interface IMAPConnector{ 2 Store connect(String username, String password); 3 default Store connect(Account a) { 4 return connect(a.getUsername(), a.getPassword()); 5 } 6 } I like to refactor to have only 1 interface IMAPConnector { 2 Store connect(Account a); 3 } How tho do that: All implementing classes and interfaces must change the implementing method from connect(String,String) to connect(Account) having two new first lines: String username = a.getUsername(); String password = a.getPassword(); . What requirements: The Method connect(String,String) must not be used.