I have seen way of querying in many ways but does that really make a difference or its just a way of coding
List<CustomObj__c> CustObj = new List<CustomObj__c>();
CustObj = [Select id, Name, CustField1__c, CustField2__c from CustomObj__c];
And
for(CustomObj__c i : Select id, Name, CustField1__c, CustField2__c from CustomObj__c){}
Is there a difference or just a way of writing a code.