Java, Simulation, Programming, Science, Coding.
compareTo method. If you are not familiar with comparable interface I suggest you to give a quick look onto that. Moreover, a event class must contain two particles : its current time step and the number of collision met by each particles. The reason behind maintaining the number of collision is