A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

New answers tagged

0

If someone else needs to call a method, it must be public. If nobody else needs to call it, you make it private. And the opposite of course: Only code inside your class can call private methods; anyone can call public methods. Imagine your boss tells you what your class needs to be able to do, and how and with which interface this functionality is called. ...


0

If you want either inherit these methods in derived class or reuse by other classes then declare them as Public. And if you protect it from being used by any other class then declare them as Private. Because methods that are private can only be called by methods within the same class or within the same "module". Methods are not commonly made private; usually ...


2

No, Berkeley Sockets are not the only networking API. The Wikipedia article you linked to lists a couple of alternatives. The most notable ones are STREAMS, which appeared in Research Unix 8 and are part of Unix System V Release 4. Operating Systems that are compatible with SVR4 still provide STREAMS-based networking APIs, even if just as a shim layer on ...


Top 50 recent answers are included