boolean (int compilerVersion, int targetPlatformVersion) { if (targetPlatformVersion > compilerVersion) { return false; } if (compilerVersion < 9) { return true; } if (compilerVersion <= 11) { return targetPlatformVersion >= 6; } return targetPlatformVersion >= 7; }