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
kathirkathir 

Difference in Lists

What is difference between

 

Account a = new Account();

and

List<Account> a = new List<Account>(); ?

 

I m little bit Confused , plz explain in simple and clear . because i m new to java Code.

Best Answer chosen by Admin (Salesforce Developers) 
aalbertaalbert

"Account a" refers to 1 single Account object.

A list can contain 1 or more Account objects.