The sarcasm of my colleagues notwithstanding, my magic wand stopped working this morning. :-) Learn by doing, reading, and studying the works of others who are known to be competent in the field. Best single C++ reference work? The ARM (Annotated Reference Manual) by Ellis and Stroustrup. Stroustrup invented the language, so he must know something about it...

Here in this code you will get the output as the remainder.That is, for example 10/5 implies output(quotient)=2,where as 10%5 implies output(remainder)=0. I think you get a better idea about %.similar to the example 10/20=0(since i is an integer,if i is float 10/20=0.5)and** 10**%20 yields the same **10 **(as 10 is smaller than 20)if 30%20 implies output 10 as 30 has one 20 in it q=1,(30-20=10)r=10.And when 20%20 yields output of 0(r) where 20/20 yields output 1(q).Hope u understand the difference between divide(/)[which yields output as quotient(q) and modulus(%)[which yields output as remainder(r)].

public class Main {
public static void main(String[] args) {
long timeCheck;
long periodOfTime;
ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(2);
long initialDelay = 0; // ...