A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.oracle.com/en/java/javase/20/docs/api/java.base/java/util/../lang/Runtime.Version.html below:

Runtime.Version (Java SE 20 & JDK 20)

All Implemented Interfaces:
Comparable<Runtime.Version>
Enclosing class:
Runtime

A representation of a version string for an implementation of the Java SE Platform. A version string consists of a version number optionally followed by pre-release and build information.

Version numbers

A version number, $VNUM, is a non-empty sequence of elements separated by period characters (U+002E). An element is either zero, or an unsigned integer numeral without leading zeros. The final element in a version number must not be zero. When an element is incremented, all subsequent elements are removed. The format is:

 [1-9][0-9]*((\.0)*\.[1-9][0-9]*)*
 

The sequence may be of arbitrary length but the first four elements are assigned specific meanings, as follows:

 $FEATURE.$INTERIM.$UPDATE.$PATCH
 

The fifth and later elements of a version number are free for use by platform implementors, to identify implementor-specific patch releases.

A version number never has trailing zero elements. If an element and all those that follow it logically have the value zero then all of them are omitted.

The sequence of numerals in a version number is compared to another such sequence in numerical, pointwise fashion; e.g., 10.0.4 is less than 10.1.2. If one sequence is shorter than another then the missing elements of the shorter sequence are considered to be less than the corresponding elements of the longer sequence; e.g., 10.0.2 is less than 10.0.2.1.

Version strings

A version string, $VSTR, is a version number $VNUM, as described above, optionally followed by pre-release and build information, in one of the following formats:

     $VNUM(-$PRE)?\+$BUILD(-$OPT)?
     $VNUM-$PRE(-$OPT)?
     $VNUM(\+-$OPT)?
 

where:

A version string 10-ea matches $VNUM = "10" and $PRE = "ea". The version string 10+-ea matches $VNUM = "10" and $OPT = "ea".

When comparing two version strings, the value of $OPT, if present, may or may not be significant depending on the chosen comparison method. The comparison methods compareTo() and compareToIgnoreOptional() should be used consistently with the corresponding methods equals() and equalsIgnoreOptional().

A short version string, $SVSTR, often useful in less formal contexts, is a version number optionally followed by a pre-release identifier:

     $VNUM(-$PRE)?
 

This is a value-based class; programmers should treat instances that are equal as interchangeable and should not use instances for synchronization, or unpredictable behavior may occur. For example, in a future release, synchronization may fail.

Since:
9

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4