Basically you have one interface/abstract class (let’s call it Context) that has an update method and a render method (plus maybe some other methods).
Then you subclass this interface into different contexts depending on what they are supposed to do (like one context for the main menu, one for the actual in-game and so on).
In your gameloop you hold a reference to the current context (thus you will only run that context’s code).
Is this a good strategy for games? I mean it does make the code a lot cleaner and possibly easier to understand (since if you have a class called MainMenuContext then you’ll know it will be the main menu).