Be able to = Have an opportunity?
Hello, everyone!
I'll be really happy if you can help me with the phrases "Be able to" and "Can". If I'm not mistaken they both have mainly the same meaning. The only difference is that "Can" is more common, and "Be able to" is more formal.
But do the sentences below have the same meaning or there is a difference between them? E.g.:
1) I can swim. (I think this sentence means that I learned to swim some time ago and now I know how to swim, how to move my legs and arms, how to breathe etc. And if now someone asked me to swim, I'd do it with no problem.)
2) I am able to swim. = I have an opportunity to swim. (If I'm not mistaken, such a sentence can have a meaning that I have an opportunity to swim, maybe right now I'm standing at a river and have a swimming suit with me for example.)
Correct me, please, if I'm mistaken.
Thank you all for your help in advance! :)

