I want to create interface, and x classes implementing this interface. And when the program is running I want to create new object which is instance one of this classes, which class is set in .properties file. Is it even possible ?
For example I have interface
public interface A{
void a();
}
class B1 implements A{
void a(){}
}
class B2 implements A{
void a(){}
}
A m = ?
And I don't know if it is possible to create object from class which is in some way define in properties?