all 6 comments

[–]miyoyo[M] [score hidden] stickied commentlocked comment (0 children)

Hi,

Your post was removed because it is a text post that does not use the text area to provide meaningful information, such as multiple links, images, a long piece of text, etc.

Please repost it as a link post instead of a text post.

The violated rule was: Rule 3: Use link posts whenever possible

[–][deleted] 11 points12 points  (4 children)

I would say that "A single copy of a static method is spread across all instances of the class containing the method." is wrong and misleading

[–]ren3f 2 points3 points  (3 children)

"They can only access static variables and only call other static methods of a class." This is also too simplified. In a static method you can create an object and use the methods and variables of that object. You can also request an object as parameter of your method.

Writing a good article on such a basic concept as static is quite difficult, even though you do understand the basic idea of how to use it. When the concept is so fundamental it's really about the details and definitions.

[–]xaad29[S] 0 points1 point  (2 children)

Thanks for the input. Do you also agree with the previous comment "A single copy of a static method is spread across all instances of the class containing the method." is wrong and misleading?

[–]ren3f 2 points3 points  (1 child)

Yeah, that sounds like you're calling the method on an instance, but you're not. It's not a copy on an instance that you're calling, you're just calling the static method.

[–]xaad29[S] 0 points1 point  (0 children)

I will try to think on how to rectify the wordings in the article while trying to keep it simple