Oh, and for informational purposes, there is one more of these access-specifiers: "package". This obviously means that only classes that are within the same package of the class can use it. Ex:
package pack;
public class Example
{
//Constructor
package int getSum()
{ //code }
}
If we were to have a class:
package pack;
public class ExampleTester
{
public static void main(String[] args)
{
Example e = new Example();
int sum = e.findSum(); //OK, this class is in the same package as Example
}
}
}