// 基本声明方式 boolean isActive; boolean hasPermission = true;

// 常见的命名习惯 boolean isEmpty = false; boolean canEdit = true; boolean shouldUpdate = false;

boolean isAdmin = checkUserRole(user); boolean hasPermission = verifyPermission(user, resource);

if (isAdmin && hasPermission) {
grantFullAccess();
} else if (hasPermission) {
grantReadOnlyAccess();
} else {
denyAccess();
}