Answer :
Both are important. In terms of law, justice is important. But in case of relationships, justice is backed by friendship.
Both have importance of their own. Moreover if a friend is wrong then justice is more important than friendship