In my Java program, I get NullPointerException in my HashMap even after initialising and putting values to the HashMap.
LinkedHashMap<Short,BigInteger> ft = new LinkedHashMap<Short,BigInteger>(5);
ft.put( (short) 1, BigInteger.valueOf(A));
ft.put( (short) 2, BigInteger.valueOf(B));
System.out.println(ft.isEmpty());
System.out.println(ft.get((short)1));
System.out.println(ft.get((short)2));
System.out.println(ft.containsKey(1));
System.out.println(ft.containsValue(1));