I know basics of java programming and currently trying to make android apps. I know that making anything static is a good practice as it helps in memory management. Because, if a variable can be shared by all instances of a class then its better to have that variable as static rather than let all instances have their own copy of that variable(hence increasing memory required to load the class).
I read this answer to a very similar question, but wasn't quite able to understand it.
Referring to above answer, it says that- static fields are attached to class instance, well doesn't each instance have all methods, variables and static/non static nested classes attached to itself?
My Actual Question-
Earlier, I was going through this guide for understanding viewpagers. I noticed that the myPagerAdapter class was made static. What was the use of it?