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

Query on Declare variable
Hi,
Integer i;
Public Integer i;
What is the difference between above two declaration..
You need to sign in to do that
Don't have an account?
Hi,
Integer i;
Public Integer i;
What is the difference between above two declaration..
Hi,
Integer i is a local variable, where as a public integer i can be used by the class in which it is declared.
http://www.salesforce.com/us/developer/docs/apexcode/Content/langCon_apex_variables.htm
Thanks,
Tulika
The first definition, "integer I", can mean either (a) a variable in the current function's scope or (b) a private member of a class. The former occurs when it is written inside of a function's body, while the latter occurs when it is written outside of any function's body.