This is called configuration.
You don't hardwire the data into your program but obtain it from some external source.
For example the program could read in some configuration file with these data.
A popular format for this purpose is
Java Properties file as either a flat or an xml one.
Almost any non-trivial program needs some configuration.
Of course the program could obtain the necessary value as a System property or (if applicable) a command-line argument.