@SuppressWarnings("unchecked") public static <T>T allocateInstance(Class<T> type) throws InstantiationException {
  Unsafe unsafe=getUnsafe();
  return (T)unsafe.allocateInstance(type);
}

@ SuppressWarnings ( "unchecked" ) public static < T > T allocateInstance ( Class < T > type ) throws InstantiationException { Unsafe unsafe = getUnsafe ( ) ; return ( T ) unsafe . allocateInstance ( type ) ; }
allocates a new object in the java heap
