An example of anachronism in literature is in William Shakespeare’s play Julius Caesar.
In Act 2, Scene 1, Brutus says, “Peace! Count the clock.” Cassius responds, “The clock hath stricken three.” In 44 BC, when Julius Caesar was alive, mechanical clocks were not yet invented, so mentioning a clock in the play is an anachronism because it didn’t exist at that time.