Here, new keyword is use to initialize the objects and allocate memory for the same.
In the code
List<Test> list1 = new List<Test>()
{
new Test(){ A = 1, B = "Jessica"},
new Test(){ A = 2, B = "Mandy"}
};
We have defined collection of Test class.
Inside {} braces, we are initializing class objects and allocating the memory with the code
new Test(){ A = 1, B = "Jessica"}
Then with the code
List<Test> list1 = new List<Test>()
we are initializing the collection of Test Class and allocating the memory for the same.