0

The synonyms

What is the difference between static and const ?

28th Jan 2017, 6:57 PM
Emanuel Dajti
Emanuel Dajti - avatar
1 Antwort
0
***Static static members belong to the class instead of a specific instance. It means that only one instance of a static field exists. even if you create a million instances of the class or you don't create any. It will be shared by all instances. ***Const you can't change value of a variable if you declare it as Const. and you must provide it's value when you declare it.
28th Jan 2017, 7:01 PM
Pankaj Vaghela
Pankaj Vaghela - avatar