Please tell me how to create an event? If more precisely, then I have a class in which there is a stream that performs cyclic ( while(true) ) work, well, for example sleep 1000 and this is how I attach for example the "void Check method (here the parameters passed from the event)" from the main file activity at that time when sleep 1000 passes in a stream from another class?

  • This is called a callback interface (callback method) - pavlofff
  • you can use, in my opinion, the pattern listener that is already implemented in java - abbath0767

0