I found two documents on oracle site.I was thinking that one of new feature of java7 non-reifiable-varargs should be mentioned in varargs document but there is nothing like that.Please can you explain that this feature is enhancement of varargs or it comes under an other topic ?.
The first link doesn't describe an enhancement to the vararg mechanism itself. I it merely describes a situation where type-erasure for a method using varargs and generics could lead to a ClassCastException at runtime.
In fact, the compiler has always been able to detect this and report it as a warning, it's just that as of Java 7 the way this warning is reported has changed:
Note: The Java SE 5 and 6 compilers generate this warning when the ArrayBuilder.addToList is called; in this example, the warning is generated for the class HeapPollutionExample. These compilers do not generate the warning at the declaration site. However, the Java SE 7 generates the warning at both the declaration site and the call site ...
Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.