Private
The object can only be used in the class. In this example, the "name" string is private, which means that "name" can only be used in the "example" class.
public class example {
private String name;
}
Public
Can be used anywhere.