public class Main { public static void main(String[] args) { PersonFactory<Person> personFactory = Person::new; Person person = personFactory.create("Firstname", "Lastname"); System.out.println(person.firstName); System.out.println(person.lastName); } } @FunctionalInterface interface PersonFactory<P extends Person> { public P create(String firstName, String lastname); } class Person { final String firstName; final String lastName; Person(String firstName, String lastName) { this.firstName = firstName; this.lastName = lastName; } }