Apex code developers guide says
"The ID of an sObject is a read-only value and can never be modified explicitly in Apex unless it is cleared during a clone operation, or is assigned with a constructor"
thinking this tried to assign the id for for an sobject Account in a method it found working. So I feel the documentation is wrong. Or is there any other views? Below is my method
public void setAccountId()
{
Account a = new Account(id='0019000000sAr8H');
}