Example: class Person{ private: string name="john doe"; string skinColor = "white'; } $obj = new Person(); $obj->name; // john doe $obj->skinColor; // white