Get Browser width statically

I asked chatGPT and this is what I got

But these methods are not available and I’m not sure how I can use this page.addBrowserWindowResizeListener(event -> event.getWidth()) as a parameter value to a method like below

public static boolean isMObile(int width) {
        return width < MOBILE_BREAKPOINT;
    }

image.png