Advertisement
Betlista

init block test

May 18th, 2012
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 0.49 KB | None | 0 0
  1. public class InitBlockTest {
  2.  
  3.     {
  4.         // init block
  5.         System.out.println( "in init" );
  6.     }
  7.  
  8.     public InitBlockTest() {
  9.         this( 0 );
  10.         System.out.println( "InitBlockTest()" );
  11.     }
  12.  
  13.     public InitBlockTest(final int n) {
  14.         System.out.println( "InitBlockTest(n=" + n + ")" );
  15.     }
  16.  
  17.     public static void main( final String[] args ) {
  18.         new InitBlockTest();
  19.         System.out.println("=== === ===");
  20.         new InitBlockTest( 4 );
  21.     }
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement