function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
bonny mankotiabonny mankotia 

List Statement

I just want to know what is the difference between these two statements.

1) list acc = new list([select id,name,Site from account limit 5]);

2)list acc4 = [select id,name,Site from account limit 10];

Both gave the same output.
Waqar Hussain SFWaqar Hussain SF
Both are same. 
It is same like
Account acc = new Account(Name='test Acc');

AND 

Account acc = new Account();
acc.Name='test Acc';