Dynamically naming new java object.
//An item from a list is selected and stored in the variable departure as a string.
String departure = (String) listOrigin.getSelectedValue();
I want to then use this variable to create an instance in order to access object properties/data.
departure accessData = new departure
Data is stored in a class with the same name as the departure if that makes sense, but in a different package, hence why i need to create an instance. I need to access the data in that departure class.
accessData.get+departure+() //method can then be called so data can be returned
Any ideas ?