Should you share your salary or finances with your friends?

Recently had a couple of encounters where I was asked about my salary. While having a one-on-one conversation with 2 of my friends they both asked about my salary. Both times I was a little hesitant to share my salary because I’m not sure if you should share it with your friends. So I tried to avoid the conversation with both of them, but the first friend understood that I was a little hesitant and he respected that by not pushing it. However, the second friend was being pushy and I couldn't talk myself out of it.

So would like to know your thoughts on whether should we share our income with our friends and family.

Also, any suggestions to avoid such conversation whenever someone asks?