Why doesn't method4 need a static keyword while all the others need it when they're being referenced ?
Need help understanding static
Resolved
Comments (4)
- Popular
- New
- Old
You must be signed in to leave a comment
Connor
1 May 2019, 23:10
Since you're now level 11, did you ever figure it out?
0
fran
30 October 2018, 19:45solution
It's struggle me too. You're reference a non-static method (in this case method4) from a non-static context (in this case method3) so there is no problem at all.
If you try to make the method3 static, the compiler will indicate an error.
I hope this explanation will be useful!!!!!
+9
Sergo
5 January 2020, 13:58
Thank you
0
Tayyab Mubeen
30 October 2018, 19:05
paste some code...!!!
there is nothing...?!
0