This is bad practice. Classes are intended to be independent from one another therefore you should avoid global variables at all costs. A more realistic approach is to have a config file, usually in JSON, YAML, or XML file format, and have your program read from this file on start up.