One of the first things you learn in Swedish is the every day Hej! Everybody is hej-ing everyone, from old to young, from children to their grandparents. This looks like a very nice socialist habit at the first glance. That, until you discover the multiple colors of Hej.
There is a friendly Hej you may occasionally hear from Swedes. This is the iiiiiiiiiii Hej, when the last vowel is raised cheerfully. It`s the Hej meaning you are welcome, we like you, if you prove to be as you seem to be, maybe we can fika (aka get a coffee and a brioche) together. That`s the maximum Hej you can get.
Then there is the neighborly Hej. This one does not a cheerful I, but a long e. Sounds more like Heeeeeeeej. What can I do, I am your educated and well-raised neighbor, it wouldn`t look good for myself not so salute you in any way, so here is your Hej but don`t dare to ever bother me. It`s a kind and distant Hej, though.
You might also get a racist-xenophobic-bored-suspicious-avoiding Hej. This one does not have any raised or cheerful vowel. It`s the pure: who the hell are you, why are you looking so different, this country is clearly going to hell Hej. Depending on your language skills, you may reply to it with one of the above-described Hej-s, but I cannot guarantee that the initial Hej you get shall ever be friendlier.