You need to sign in to do that
Don't have an account?

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.
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.

Word Integer is the correct premitive data type of Salesforce apex. Salesforce does not recognize int as integer.