+ Start a Discussion
Hadi MohammadiHadi Mohammadi 

Why we can not use int in "for" clause in apex?

Hello, I'm a newbie to the Salesforce platform. 
Can anybody say why we can not use "int" in "for" clause and we have to use Integer in it?
for example 
for (Integer i = 0 ; i < 200; i++) { ... } is correct but 
for (Integer i = 0 ; i < 200; i++) { ... }  is wrong.
Best Answer chosen by Hadi Mohammadi
Waqar Hussain SFWaqar Hussain SF
Word Integer is the correct premitive data type of Salesforce apex. Salesforce does not recognize int as integer.