In an Interview, Interviewer asked me this question that how to restrict an application developed in java between a minor version and major version. I know about -target options as Cross-Compilation Options but not sure about the restricted application between minor and major.
Even i search for it, i didn't find any data related to same.
My Question:
Whether it is possible to restrict an application between minor and major?
Answer
As suggested by Subin, Compile the application with minor version and check major version by inspecting java.version as answered by SimonC in application which may fulfill the minor and major version restriction for an application.