View Javadoc
1   package npe;
2   
3   public class UseCheckUse {
4   	final Object x;
5   	UseCheckUse(Object x) {
6   		this.x = x;
7       }
8   	int f(boolean b) {
9   		int result = x.hashCode();
10  		if (x == null) {
11              System.out.println("x is null");
12  		}
13  		if (b) 
14  			result *= x.hashCode();
15          else
16  			result += x.hashCode();
17  		return result;
18  	}
19  
20  }