Top "Private-methods" questions

C Private Variables Get and Set methods

I am working in C, and have some variables that I don't want to be global, but I do want …

c private-members private-methods
How to use a private method in Java

I am given a class that has a private method say setCoors(int x, int y). The constructor of that …

java methods private-methods
Invoking a private method via JMockit to test result

Am using JMockit 1.1 and all I want to do is invoke a private method and test the return value. However, …

java junit jmockit private-methods
private method in inheritance in Java

I have confusion about using private methods in inheritance, for example: public class A { private void say(int number){ System.…

java inheritance private-methods
org.jboss.weld.exceptions.WeldException: WELD-000049: Unable to invoke private void init()

For some reason, the following code is not working, and I do not understand why. My current, and quite hand-wavy, …

jsf cdi private-methods postconstruct
Good naming convention for private member functions in C++?

For members, I use //.......vv SomeType m_XXX; //.......^^ I'd love to use _ as a prefix for member functions, but names …

c++ naming-conventions private-methods
Error: Attempt to call private method

Coming from a long history of C-style syntax and now trying to learn Ruby (on Rails), I've been having my …

ruby-on-rails ruby access-specifier private-methods
Pass parameters to PrivateObject method

I am trying to unit test private method. I saw example below on this question Class target = new Class(); PrivateObject …

c# unit-testing private-methods
mocks - how to verify private method was called

I am trying to mock a private method and verify it has been executed. The mocking itself works fine, that …

java junit powermock private-methods
Partitioning struct into private and public sections?

In C++ and Java, data structures can have private, public and protected regions. I'd like to port this concept to …

c struct private-methods