compat/src/main/java/androidx/core/os/BuildCompat.java
public static boolean isAtLeastQ() {
        return VERSION.CODENAME.length() == 1
            && VERSION.CODENAME.charAt(0) >= 'Q'
            && VERSION.CODENAME.charAt(0) <= 'Z';
    }
/**
     * Checks if the device is running on a pre-release version of Android Q or newer.
     * <p>
     * <strong>Note:</strong> This method will return {@code false} on devices running release
     * versions of Android. When Android Q is finalized for release, this method will be deprecated
     * and all calls should be replaced with {@code Build.SDK_INT >= Build.VERSION_CODES.Q}.
     *
     * @return {@code true} if Q APIs are available for use, {@code false} otherwise
     */
Checks if the device is running on a pre-release version of Android Q or newer.

Note: This method will return  false on devices running release
versions of Android. When Android Q is finalized for release, this method will be deprecated
and all calls should be replaced with  Build.SDK_INT >= Build.VERSION_CODES.Q.

@return  true if Q APIs are available for use,  false otherwise
Checks if the device is running on a pre - release version of Android Q or newer . Note : This method will return false on devices running release versions of Android . When Android Q is finalized for release this method will be deprecated and all calls should be replaced with Build . SDK_INT > = Build . VERSION_CODES . Q . @return true if Q APIs are available for use false otherwise
public static boolean isAtLeastQ() {
        return VERSION.CODENAME.length() == 1
            && VERSION.CODENAME.charAt(0) >= 'Q'
            && VERSION.CODENAME.charAt(0) <= 'Z';
    }
public static boolean isAtLeastQ ( ) { return VERSION . CODENAME . length ( ) == 1 && VERSION . CODENAME . charAt ( 0 ) >= 'Q' && VERSION . CODENAME . charAt ( 0 ) <= 'Z' ; }
Checks if the device is running on a pre-release version of Android Q or newer.
Checks if the device is running on a pre - release version of Android Q or newer .