Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * 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 com.mycompany.ja13;
- public class Main {
- public static void main(String[] args) {
- Calculator с = null;
- Calculator c2 = new CalculatorImpl();
- c2.calc(10, 20);
- // нет необходимости создавать отдельный класс
- Calculator c3 = (a, b) -> {return a + b;};
- int res = c3.calc(20, 20);
- System.out.println("res=" + res);
- Runnable r = () -> {System.out.println("HELLO");};
- r.run();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement