0

I was programming and I came across a question, is it more expensive for a system to have a static element? Does a private element generate a gain by being viewable only in its class? This came from thinking that something that was visible to the entire "static" system could be more costly than something internal "Private".

And then, is there any difference even if totally imperceptible?

Edit. When I refer to static I say something "static public" and when I say private it's just "private".

Woton Sampaio
  • 469
  • 6
  • 24

1 Answers1

1

ClassLoader loads all static elements with their owner classes, no problem their instances is created or not. I'm not really got your opinion but by some circumstances, your opinion is right.

Johnny Ngo
  • 104
  • 4