Advertisement
Guest User

Untitled

a guest
Apr 30th, 2012
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class StaticDefault {
  2.     private static final int foo;
  3.  
  4.     static {
  5.         foo = getFoo();
  6.     }
  7.  
  8.     private static int getFoo() {
  9.         return foo;
  10.     }
  11.  
  12.     public static final void main(String[] args) {
  13.         System.out.println("Hi there, foo = " + foo);
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement