Simple java program to find a missing integer in a sequence