Is it better including Enum type data in public or private section of the class ? for example when declaring a class for a traffic light ?
Printable View
Is it better including Enum type data in public or private section of the class ? for example when declaring a class for a traffic light ?
if the enum is going to be for your classes internal use make it private. If clients of your class must be able to use the enum then make it public.