chevron_left

Recent posts tagged static-variable

12 1 2 min.
In object-oriented programming languages, there are three types of variables: **- Local Variables - Static Variables - Instance Variables** The **local variables** are the ones that are declared inside a function and cannot be accessed outside of...
posted Sep 14 Hafsa_Rao 358 points
3 0 1 min.
If you try to  access an instance variable or say non-static variable in a static method, you would end up with static reference error message.For instance, in the following example, variable "a" is class variable/non-static instance v...
posted Aug 5 SharadMagar450 320 points
0 0 2 min.
In this article, I am going to give a brief about the static variables in a class, how to share data between the instances of class.Static VariablesYou know that static variables and static methods belong to the class and they are shared between all ...
posted Nov 1, 2020 MallikaShaik672 0 points
To see more, click for the full list of questions or popular tags.