{{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:

Java Script GET request Sample Code

fetch(' https://api.public.com/api ')   .then(response => response.json())   .then(data => console.log(data))   .catch(error =...