title: Java: MVC and anonymous class for Controller
body: <p>I have a question about MVC pattern. I’m trying to use it for <strong>desktop</strong> project (i.e. not for net application), using Java in IntelliJ IDEA.
  I am trying to create Model, View and Controller, according to MVC pattern. My question is: is it safe to say that from Java’s point of view, marked methods are already serving as Controllers and there is actually no need to create an explicit Controller class as a separate class? Like this:</p>
  
  <p><img src="https://i.stack.imgur.com/30S95.png" alt="Option 1"></p>
  
  <p>Or do I have to have to create an explicit CalculatorController class, like this:</p>
  
  <p><img src="https://i.stack.imgur.com/QBRcW.png" alt="Option 2"></p>
  
  <p>Remember that my task is to preserve MVC patter, where tasks for M, V and C are clearly divided.
  Of these 2 options, which one preserves MVC pattern? Only the second, or both equally?
  Thank you!</p>