Q:

.values() syntax in DML statement

I was going through a section of the code in "Advanced Apex Programming" book. 
In particular I was slightly puzzled to see this code
List<Contact> cts = [SELECT ID,AccountId,Account. Id,Account. AnnualRevenue FROM Contact WHERE Name = 'testcontactln'];

Map<Id,Account> accountstoupdate = new Map<Id,Account>();

for(Contact c : cts)
{

if(ct. Account. AnnualRevenue == null)
{
   ct. Account. AnnualRevenue = 500;
   accountstoupdate.put(ct. AccountId,ct. Account);

}

}
update accountstoupdate.values(); //HERE

Can someone tell me the difference between "update accountstoupdate" and "update accountstoupdate.values()" ? 

A:

Your accountstoupdate is type of Map.  DML update action requires an sObject or List of sObject type.  accountstoupdate.values() gives you a list of Account where you can perform an update DML. 
I'm not sure if it works without error update accountstoupdate as you said.  This should throw an run time error since you can't perform DML on a Map, I guess.