Skip to content

Instantly share code, notes, and snippets.

@viveknaskar
Created October 22, 2020 10:25
Show Gist options
  • Save viveknaskar/2240c8591cca291d161f3949d07614d8 to your computer and use it in GitHub Desktop.
Save viveknaskar/2240c8591cca291d161f3949d07614d8 to your computer and use it in GitHub Desktop.
Lambda Expressions Example with No Parameters
package com.viveknaskar;
public class LambdaExample {
public static void main(String[] args) {
WishingInterface wishing = () -> {
return "Hello World!";
};
System.out.println(wishing.wish());
}
interface WishingInterface {
public String wish();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment