Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
Integer[] myInts = new Integer[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; for (Integer i : myInts) { System.debug(i); }
: in for loop represents the for each item in list or set.
For example, the following code outputs the numbers 1 - 10 to the debug log: here i is the variable, Integer is the data type of list and myInts is the list or set
Please refer below link to know more about loops in apex.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_loops_for.htm
Hope this helps you!
If this helps you, please mark it as solved.
Thanks and Regards
Sandhya