I am currently learning APEX (well starting to)
I am on the trail https://trailhead.salesforce.com/content/learn/modules/apex-basics-for-admins/practice-in-the-developer-console?trail_id=build-apex-coding-skills
I understand everything up until the "Let's declare a variable" part.
I am able to follow the steps such as Debug | Open Execute Anonymous Window
However I am confused as to the context or relevance of this part? What does System.debug, open log, execute do for me? I am struggling to understand the context of this part of the page.
Can anyone help in telling me what this process is doing? What is it helping me with? I went from learning the Variable data types which was fine to suddenly a Open Execute Debugs, it has just thrown me a little
Any help is appreciated
Thanks Eric, so the first part of the code / system.debug is used and is simply telling me I have an Integer Data type however I have NOT set an initial value for the Variable?
Then the second part of code is setting the Value as 1 for the Number of spoons Integer.
If thats the case, am I right in saying that in a perfect world, I would of set the Integer to a value of 1 already but If not or the code didn't work, I'd use System.debug to show me that I hadn't set the variable yet.