I have this in my code
Thread.currentThread().sleep(x);
Eclipse tells me to use the static
Thread.sleep(x);
Thread.currentThread().sleep(x);
or the way Eclipse says so Thread.sleep(x);
static context is required if it is in the need, so we hold on for slight delay with this sleep.
Static paradigm set by one object, only affects that particular object heap print life cycle, again considering the overall Object Life Cycle static is not that bothersome, if required it can be used to ease the coding, but to be done carefully as static foot-print is referred by Class
(for example:- Class.forName(pkg.className)
) as like by name and not by any object
which is run-time single print copy of Class in HEAP
memory.
Again usage of object also has pros & cons by Weak, Phantom, Strong kind of references....,
Code is Convoluted by Nature. It is just the way how we do in order to make it work & functional.