World No. 1 Novak Djokovic announced on social media on Thursday that he will compete in the Tokyo Olympics.