/* Taken from https://java2blog.com/java-cyclicbarrier-example/ (accessed 24.08.2022) and slightly modified. */ public class StartParty implements Runnable{ // This is an event that will be triggered when the necessary amount of threads have reached the barrier. public void run() { System.out.println("As 5 students have arrived, the party can start now!"); } }