How do I add an "L" to the end of an integer?

It seems the API you’re using scheduler.scheduleSyncRepeatingTask() expects the last two parameters to be of type long. Since, an int can implicitly fit into a long, passing timeBetween as it is will work just fine.

Same goes for the second parameter too. You can pass 0 instead of 0L there as well. It works out the same. Basically, you’re gaining nothing by explicitly passing a long literal here. They make sense in cases where you want to assign a long with a literal value that’s outside of the integer’s range.

Browse More Popular Posts

Leave a Comment