James is one of the four children of Paul McCartney, 76, and the late Linda McCartney. Lennon is the only child of the late John Lennon and Yoko Ono, 85.
Fans flocked to the selfie to comment on how much the two resembled their famous dads.
'It's like John and Paul looking in the mirror,' one wrote, with another adding, 'Wow, they look soooooo much like their fathers.'
Others echoed sentiments like 'Great pic,' and 'Brings back memories.'
The sons of the music legends have inherited their father's musical talents.
In 2017, Lennon released a song he had co-written with the late Carrie Fisher.
Lennon wrote on his SoundCloud page, 'Carrie and I wrote this song years ago. When she died I just felt I had to record it.
'This is only a demo unmixed, we only had a few hours to record it. But the lyrics she wrote with me I think are marvellous. Carrie and I used to stay up til dawn chatting and pontificating about life. They were my best moments.'