List<datatype> list1 = new List<datatype>();

Example:

List<String> stList = new List<String>();

stList.add(‘ABC’);

stList.add(‘DEF’);

stList.add(‘FGH’);

OR

List<String> stList = new List<String>{‘ABC’,’DEF’,’FGH’};

Our Recent Blog

Share This Post