This can be seen in the example of a character who believes they are doing something good but actually causing harm, or when a situation turns out to be the opposite of what was intended.
For instance, in the play “Romeo and Juliet,” Romeo and Juliet believe that they are meant to be together and that their love is stronger than any obstacle. However, their love ultimately leads to their tragic deaths, which is the opposite of what they expected. This contrast between their expectations and the reality of the situation creates situational irony.