All perfect praise be to Allah the Lord of the Worlds. May His peace and blessings be upon our Prophet Mohammad and upon all his family and companions.
Talking to a person from the opposite sex is forbidden in Islam because it entails a great deal of evil, which could lead to a graver sin. Moreover, Islam forbids having a friend from the opposite sex. And Allah The Almighty Knows Best.