Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to use -> in java (Lambda Expression)

//The:
Runnable r = ()-> System.out.print("Run method");
//is equivalent to:
Runnable r = new Runnable() {
        @Override
        public void run() {
            System.out.print("Run method");
        }
};
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #java
ADD COMMENT
Topic
Name
3+6 =