what version of java do i have code example
Example 1: how to check which java version i have
java -version
Example 2: check java version
java --version
Example 3: java check jre version
java -version #for jre version
javac -version # for java compiler version
Example 4: check Version of java
$ java -version
java version "1.8.0_121"