I always come across two ways of assigning results from a SOQL query to a list and I just wondered if there is any difference between the two:1. List<Account> exampleOne = [SELECT Id, Name FROM Account WHERE Name = 'John'];2. List<Account> exampleTwo = List<Account>([SELECT Id, Name FROM Account WHERE Name = 'John']);
Line 2 should be List<Account> exampleTwo = new List<Account>([SELECT Id, Name FROM Account WHERE Name = 'John']);And, there is no difference between tge 2, use whichever you prefer.