I want to make a code that works for Java 1.8 and 1.7. Specifically, I want to implement a static method in the interface. This is allowed in java 8 but not in 7. I read there is a way pipe C macros, also that this is not good practice. Additionally, piping the macros do not tell me which SDK is being use?
So there is any "good" solution to this?
UPDATE:
Please do not suggest implement an abstract class. Thanks.
NO DUPLICATE
Can Java 8 code be compiled to run on Java 7 jvm? asks if there is a way by command line to compile the code of java 1.8 in 1.7. At least the answer looks so. The question I do, it is if there is a way to indicate in the code which parts are from the code belongs to 1.8 and what to 1.7.