Advertisement
Guest User

Untitled

a guest
Nov 8th, 2017
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.28 KB | None | 0 0
  1. @RequiredArgsConstructor
  2. class MyClass {
  3.  
  4.     private final int x;
  5.     @Getter(lazy = true)
  6.     private final int sqrt = 15;
  7.  
  8.     public static void main(String[] args) {
  9.         final MyClass myClass2 = new MyClass(2);
  10.         System.out.println(myClass2.sqrt); // null
  11.     }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement