If I want to reference a variable in one of two ways by the same name as if it were a type 'var'. How would I do this in Java? e.g.
String var1 = "";
In this case I want to use var1 to either contain a string used to make a connection, or contain a reference to an object that refers to an already open connection.