Please show me the best way to learn programming.
I started learning Java for a year and a half but I never finished a book yet. My problem is after reading each chapter, I start doing all home work at the end of chapter, but there are many home works at the end of each chapter. Some I can do them, but some I have no Idea what is it. The time to figure them out is too much. If I keep figuring them out then some time it took me a month to finish a chapter. So, should I just do some exercises and samples and skip to a new chapter or try to do all home works then to start the new chapter? I know that doing all home works will best for me but it costs me a lot of time to get it done. Please show me how to learn this program.
I'm reading "Introduction to JAVA"
Thank you very much!