The Java has a lot changes since JDK1.0 as well as numerous additions of classes and packages. In addition to this class and package ,Java introduced class standard libraries. The classes, packages and various Standard libraries is Java Version
In this Tutorial we want to describe you a code that help you in understanding in get Java Version. For this we have a class name Get Java Version. Inside the main method we declared a string array variable name 'pro' is initialized with respective value.
1)System.getproperties - This method returns a string containing
property value . Incase the property does not exist, this version of
for loop is used to display the name of Java version present in String pro using System.out.println.
2)properties.getproperties(pro[i])-This method return you the value of java version by passing pro string in it and print it using println.
On execution of code, the code show you Java Version and its value present in a String array variable.GetJavaVersion.java
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.