Consider a below simple design, where private static has significance.
You want to have some data hiding (abstraction) and want to use that data in both static and non-static functions of a class:
Consider below example:
public class test
{
private static int funcValue()
{
return 200;
}
public static void someStaticFunc()
{
int x = funcValue();
}
public void anotherNonStaticFunc()
{
int y = funcValue();
}
}
calling:
test t = new test();
test.someStaticFunc();//static
t.anotherNonStaticFunc();//non-static
In the above example, if you do not declare funcValue
as static, you can not call it in the static function someStaticFunc
and also you want funcValue
to be private (abstraction).