Lambda Expressions: It is a anonymous(nameless) function. It does not has method name, method return type nor modifiers
System.out.println("Hello world");
}
Converting above method into lamda expression:
for that we use '->' symbol
no method name,no return type and no modifiers
() -> {System.out.println("Hello world");}
General Method:
public void m1(){System.out.println("Hello world");
}
Converting above method into lamda expression:
for that we use '->' symbol
no method name,no return type and no modifiers
() -> {System.out.println("Hello world");}
0 comments:
Post a Comment