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
DEV_CGDEV_CG 

what is the difference between object.get(Fieldname) and object.fieldname

scope is list of records from start method of batch which are passed to execute method.

for(SObject obj : scope)
         {
            String fieldValue='';
                for(String fieldName : queryFields)
                {   
                 fieldValue = fieldValue +','+ obj.get(fieldName);
                }
          }
does it work if we sue obj.fieldName
 
Raj VakatiRaj Vakati
Both are the same .. Its another notation of use 


That method of using chain dot notation saves us from writing more code and it saves space in our computer’s memory because we aren’t allocating another variable in memory.


https://medium.com/modernnerd-code/java-for-humans-methods-dot-notation-51077bab55e1
DEV_CGDEV_CG
thanks Raj