Pawan Kr Gupta wrote:Dear The second code will not compile.
This will give you a compile time error - incompatible types error , required:java.util.List<javax.swing.Document> found :java.util.HashSet
Sorry, my mistake. I have edited it. Thank you for reply.
But the question remains.