Created
August 25, 2020 19:32
-
-
Save SarahNicewander/112cdaa48677db22e3a9bceb113e625f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public with sharing class Welcome { | |
//Welcome! I'm a comment and I'm here to tell you what this particular class file is for. The developer who created this class added | |
//me so that future developers, like yourself, would have a quick little introduction to what this class does. | |
//The two little slashes tell the compiler* that everything following on this line is a note | |
//for humans and not code that needs to be executed | |
// (* A compiler is the computer program that translates this code into executable computer instructions) | |
//But you know what? This set of comments is already several lines long and getting longer. I'm tired of typing two slashes every time | |
/*There. That's better. the '/*' tells the compiler that there are multiple lines of comments coming. It knows everything on this line | |
and any following lines | |
and lines | |
and lines | |
and lines will continue to be comments | |
until it sees a */ | |
//Ok, let's get started! | |
public static void youDoThisPart() { | |
/*Your assignment is to write two comments below this one. They should describe the few lines of code you se below. | |
Simply describe what the code is doing based on what you learned from readings and in class. | |
Make one as a single line comment using the // notation. Make the other one a multi line comment using the /* notation. | |
When you're done, save this file so that it is compiled and stored in Salesforce. */ | |
//declare a variable with the type of 'integer' the name 'i' | |
Integer i; | |
//Assign Variable i the value of 2. | |
i = 2; | |
/*declare a String variable named | |
* 's' the value of 'My String'.*/ | |
String s = 'My String'; | |
} | |
public static void letsTalkAboutIndents() { | |
//As you look through the sample code in this org, and other places, you'll probably notice it looks pretty tidy | |
//That is the magic of indenting. Through simply keeping logical groupings indented the same number of spaces | |
//and then indenting sub-sections further, you always know what section you're in | |
//Take a look at different classes in the sample code for this org, and even if you're not quite sure what it's doing yet | |
//you should see that the indenting makes logical groupings easier. | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment