re: Why Java Interfaces Are Terrible VIEW POST

VIEW PARENT COMMENT VIEW FULL DISCUSSION

You can set them to the same attribute if they both inherit from/implement that attribute. For example, you could make your attribute an AmazonDynamoDB, and have a constructor that takes the real one, and a constructor that takes the fake one, and have them both set the same attribute to what they're given.

HOWEVER, this is more or less useless, because you could just make your constructor take an AmazonDynamoDB as well, and pass either type into that constructor.

code of conduct - report abuse