sergAccount

Untitled

Feb 14th, 2021
406
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package com.mycompany.ja13;
  7.  
  8. public class Main {
  9.    
  10.     public static void main(String[] args) {
  11.         Calculator с = null;
  12.        
  13.         Calculator c2 = new CalculatorImpl();
  14.         c2.calc(10, 20);
  15.         // нет необходимости создавать отдельный класс
  16.         Calculator c3 = (a, b) -> {return a + b;};
  17.         int res = c3.calc(20, 20);
  18.         System.out.println("res=" + res);
  19.        
  20.         Runnable r = () -> {System.out.println("HELLO");};
  21.         r.run();        
  22.     }
  23.    
  24. }
  25.  
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×