0

What is static variable and static function..how they are differ from normal variable and function?

12th May 2018, 8:28 AM
shubham
2 Respostas
+ 3
static variables and functions do not need an instance of their class in order to be called or modified
12th May 2018, 8:51 AM
hinanawi
hinanawi - avatar
0
Static make function global if you make static method(function in class) you dont need to make instance of class(object) so: class funk { static int Function() ; int otherFunction() ; } ; Int main() { funk object; object.otherFunction() ; Function(); //calling not need to use object } like hinanawi say :-)
18th May 2018, 11:32 PM
Pawel Bolek
Pawel Bolek - avatar