A “deep diver” Java developer may wonder about the most simple question when observing the following line of code:
Runnable r = () -> System.out.println(“I ran”)
Is the Labmda above an anonymous class ?
As many of you may know, Runnable is a functional interface and ‘()->XYZ’ is the lambda function.
The article assume you are familiar with Lambda function and anonymous classes
Most of you probably assume the code is equal to one of the following:
Runnable r = new Runnable() {
public void run() {
System.out.print(“I ran”);
}
}
Or
class RunnableImpl implements Runnable { public void run()…
The following article explains how to handle custom protocol in different operation systems and launching applications using custom browser protocols.
As most of you already know, most of the operation systems today knows how to handle a call to a very specific list of protocols.
Examples,