Data Type determines the kind of the data the variable can hold (integer, character, string, and so forth).
Scope defines the code that can access the variable. For example, if you declare a variable inside a for loop, only other code inside the loop can use the variable. If you declare a variable at the top of a method, only the code in the method can use the variable. (more…)