-1

Can someone explain the meaning and the position of a controller class in Java ? Why do we need to put the main method there ?

Joachim Sauer
  • 278,207
  • 54
  • 523
  • 586

1 Answers1

3

A controller class is normally a class part of the Model View Controller (MVC) pattern. A controller basically controls the flow of the data.

It controls the data flow into model object and updates the view whenever data changes.

I suggest you read about it:

Draken
  • 3,049
  • 13
  • 32
  • 49
Rabbit
  • 124
  • 2
  • 11