Mid-Level
August 19, 2026

Spot the bug: Spring Boot

One snippet. Find the bug, or prove there isn't one.

java
1package com.example.auth;
2
3import org.springframework.stereotype.Service;
4
5@Service
6public class RoleService {
7
8    public boolean isAdmin(String role) {
9        if (role == "ADMIN") {
10            return true;
11        }
12        return false;
13    }
14}

Click the lines that carry the problem.

Your verdict

One attempt per day. The answer shows up right after.

Keep your streak

Create an account to keep your streak and track your progress.

Create an account