What is the difference between static int a; and int a | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

What is the difference between static int a; and int a

static

5th Mar 2017, 3:52 PM
MOHAMMED SHABEER K
2 ответов
+ 9
[Edit: This sounds weird, now that one learner deleted his post ^^ ] static is not const or final! See this post: https://www.sololearn.com/Discuss/230821/?ref=app
5th Mar 2017, 5:19 PM
Tashi N
Tashi N - avatar
0
When a method is static you can call it directly without having to instantiate an object of that class.
19th Jun 2017, 6:47 PM
Ismail
Ismail - avatar