ConcurrentSkipListSet<String> l = new ConcurrentSkipListSet<String>(l1);
this is simple , i am trying to create ConcurrentSkipListSet from List , but when trying to print created ConcurrentSkipListSet , l , it is presenting empty , can any one suggest , if any issue in this
You have two totally separate list objects. You're adding to one, not to the other.
This line: creates a new CSLS object based on the current state of the AL object at the time. After that, you have two totally separate List objects. Adding to or removing from one has no effect on the other. If you put that line after you've added to the AL, you'll see those objects in the CSLS.
(Note also that whatever objects are present in the original list when you copy it to the second one, if you modify the state of any of those objects (as opposed to modifying the state of one of the lists), you'll see that change in both lists. This is because the constructor does a shallow copy. The new list has its own set of references to the objects that the original list had, and changing the references in one list doesn't affect the other. But each reference from one list points to the same object as the corresponding reference in the other list, so changing the state (contents) of that object is visible through both lists' references.)