# canCompileOrRun

abstract fun canCompileOrRun(other: JavaLanguageVersion): Boolean(source)

Indicates if this version can compile or run code based on the passed in language version.

For example, Java 14 can compile or run code from Java 11, but not the opposite.

#### Return

`true` if this version can compile or run code from the other version, `false` otherwise

#### Parameters

other

the language version to check

abstract fun canCompileOrRun(otherVersion: Int): Boolean(source)

Indicates if this version can compile or run code based on the passed in language version.

For example, Java 14 can compile or run code from Java 11, but not the opposite.

#### Return

`true` if this version can compile or run code from the other version, `false` otherwise

#### Parameters

otherVersion

the language version to check, as an `int`