-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
28f9b0b
commit 7ab7f6a
Showing
5 changed files
with
44 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
java3/lesson1/src/main/java/javacore/lesson1/task4/Task4.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* To change this license header, choose License Headers in Project Properties. | ||
* To change this template file, choose Tools | Templates | ||
* and open the template in the editor. | ||
*/ | ||
package javacore.lesson1.task4; | ||
|
||
/** | ||
* | ||
* @author igor | ||
*/ | ||
public class Task4 { | ||
public void test() { | ||
Lambda lambdaSum = (x, y) -> x + y; | ||
System.out.println("Лямбда для суммы: " + lambdaSum.calculate(20, 5)); | ||
Lambda lambdaDiv = (x, y) -> x / y; | ||
System.out.println("Лямбда для деления: " + lambdaDiv.calculate(20, 5)); | ||
Lambda lambdaMul = (x, y) -> x * y; | ||
System.out.println("Лямбда для умножения: " + lambdaMul.calculate(20, 5)); | ||
} | ||
} |