{{theTime}}

Search This Blog

Total Pageviews

What is a Java Functional Interface

A functional interface is an interface with a single abstract method. Also know as SAM (Single Abstract Method) types.

Examples:

public interface Comparator<T> {
    int compare(T o1, T o2);
}

public interface Callable<V> {
    V call() throws Exception;
}

public interface ActionListener extends EventListener {
    public void actionPerformed(ActionEvent e);
}

public interface Runnable {
    public void run();
}

No comments:

Mysql - java.sql.SQLNonTransientConnectionException: Public Key Retrieval is not allowed

Add allowPublicKeyRetrieval=true to the JDBC URL. jdbc:mysql://localhost:3306/db?allowPublicKeyRetrieval=true&useSSL=false