public class MainClass { public static void main(String[] argv) { Integer i = null; if (i != null && i.intValue() == 5) System.out.println("Value is 5"); } }