Created
March 1, 2020 08:56
-
-
Save yakaviuk/0668f5a74fd8d3ee09fa870d19d2c647 to your computer and use it in GitHub Desktop.
Check Java Version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Version { | |
public static void main(String[] args) { | |
// System.out.println("Enter your name"); | |
// Scanner scan = new Scanner(System.in); | |
int a, n; | |
n = args.length; | |
for (a = n-1; a > -1; a--) { | |
System.out.println(args[a]);} | |
String version = Runtime.class.getPackage().getImplementationVersion(); | |
System.out.println(version); | |
double version1 = Double.parseDouble(System.getProperty("java.specification.version")); | |
System.out.println(version1); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment