I just want to write all my exposure to java/J2ee. Main focus will be on the things that I have come across with errors and what causes the error and resolution methods. Also, the better ways of using available open source libraries to make our job easier and faster. I also try to focus on the difficult things that I faces at work and how I work with them (using example code).
Conversion between the collections made pretty easy in Java.
Converting from a Set/List to List/Set can be done by passing the Set/List instance to the constructor of List/Set such as ArrayList/HashSet respectively.
Following line of code performs the conversion (from Set to List):
Good post mate. I have also shared my view as How to convert List to Set in Java let me know how do you find it.
ReplyDelete