If you try to read the book cover to cover you will most likely start forgetting it after few weeks. However when you learn things slowly over few years and interact with material in multiple ways, such as lectures, reading, test, internships, labs, group/individual project you are more likely to have some hint about the material, may be you will remember a lecture or some project or some lab experience, however in case of just reading a book its harder to recall.
A good process of learning involves not just you alone but also people around you who motivate you to stay on the course and offer assessment of your capabilities. Thus formal classroom education tends to be more useful than an online one. Though it depends a lot on your school and quality of your peers/ friend circle.