get java version in java code example
Example 1: check java version
java --version
Example 2: java check jre version
java -version #for jre version
javac -version # for java compiler version
Example 3: how to see java version in windows 10
java -version