Variables: Building blocks of Programming

Declaration of Variable:

we use these data types to declare variables. Declaration of variable is very important as we define the type of variable in this step. To use variables we need to define their data type first before using them.

Here myNum is a variable of type integer. and its value is 15.

Access Modifier:

Access modifier works as the name implies, it helps to define access range/scope for the variable. public, private, protected are commonly used access modifiers.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store