GenuineSounds

Producer shorthand.

Oct 22nd, 2014
308
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.31 KB | None | 0 0
  1. package com.genuineminecraft.src;
  2.  
  3. public class Program {
  4.  
  5.     private static interface Producer<T> { T ew(); }
  6.     private static Producer<Program> n = Program::new;
  7.  
  8.     public static void main(String[] args) {
  9.         Program pro1 = n.ew();
  10.         Program pro2 = n.ew();
  11.         System.out.println(pro1 == pro2);
  12.         // false
  13.     }
  14. }
Advertisement
Comments
  • User was banned
Add Comment
Please, Sign In to add comment