There is often confusion about the use of who and whom.
Who and whom are pronouns.
Who is a subject pronoun, in the same way as ‘he/she/they’.
Whom is an object pronoun, in the same way as ‘him/her/them’.
In the sentence “John loves Julie.” :
- John is the subject of the verb ‘love’
- Julie is the object of John’s affection.
Simple rule : If you can substitute ‘he/she/they’, use ‘who‘.
If you can substitute ‘him/her/them’, use ‘whom‘.
ie. “Who loves Julie?”
“Whom does John love?”