Top "Private-methods" questions

JavaScript private methods

To make a JavaScript class with a public method I'd do something like: function Restaurant() {} Restaurant.prototype.buy_food = function(){ // …

javascript oop private-methods
How do I use reflection to invoke a private method?

There are a group of private methods in my class, and I need to call one dynamically based on an …

c# .net reflection private-methods
Private Variables and Methods in Python

Possible Duplicate: The meaning of a single- and a double-underscore before an object name in Python Which should I use _…

python private private-members private-methods double-underscore
Overriding private methods in Java

As succinctly described here, overriding private methods in Java is invalid because a parent class's private methods are "automatically final, …

java inheritance private-methods
Private module methods in Ruby

I have a two part question Best-Practice I have an algorithm that performs some operation on a data structure using …

ruby private-methods access-specifier
Unit testing of private methods

I am in the process of writing some unit tests. In particular I want to test some private methods. So …

c++ unit-testing private-methods
Private Methods Over Public Methods

I was examining the StringTokenizer.java class and there were a few questions that came to mind. I noticed that …

java encapsulation stringtokenizer private-methods public-method
When/why to make function private in class?

When should i make a function private and why is it good idea?

c++ oop class-design private-methods
Private method naming convention

Is there a convention for naming the private method that I have called "_Add" here? I am not a fan …

c# coding-style private-methods
How to do unit testing on private members (and methods) of C++ classes

I am very new to unit testing and I am a little confused. I am trying to do unit testing (…

c++ unit-testing private-members private-methods