Convert List to Set in Salesforce

Sample Code:

//List of string variable
List<String> objList = new List<String>();
//Set of string variable
Set<String> objSet = new Set<String>();

objList.add('A');
objList.add('B');
objList.add('C');  

//Use addAll() to add list of string to Set
objSet.addAll(objList);

//Or Use Set Constructor
Set<String> objSetData = new Set<String>(objList);