Had a silly question in my head which I hope that someone can answer.
Can we declare id as a variable in Apex? For example: Id id;
I tried to declare the same and Salesforce allowed me to save my class. However when I tried to declare other Primitive types such as String or Date, I got a compile error while saving the class. String string; //compile error Date date; //compile error
These variables are not mentioned in the Salesforce documentation for Reserved keywords(link: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_reserved_words.htm)
Would anyone happen to know if there are any more such variables?
I have a jSON string that I need to deserialize, and that has 'id' as one of its attributes. I would like to understand if there would be any issues if I were to go ahead and create a variable with a name of 'id'