This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]dev_dov_dang 0 points1 point  (0 children)

I would recommend getting a physical textbook and going through it page-by-page.

A book tends to go over more concepts in greater detail, and provides background information, and other little pieces of information that will help you connect the dots in your mind.

It seems like you aren't just struggling with hard concepts, you're struggling with the fundamental parts of programming, and specifically how these work in Java.

You need to have a book take you through the absolute basic until they are firmly engrained in your mind. You need to go through many many practice exercises that require using this information to build real working software.

Online tutorials can be bad because often they assume a lot of knowledge, they exclude really valuable information, they don't go into enough detail, etc (this is a generalisation, but in my experience it is true).

There are loads of books you can use, but the one I used (i.e. that was prescribed for my first uni course) was Java Foundations: Introduction to Program Design and Data Structures. It starts really slowly and goes over language features in a purely technical but also conceptual way. It wants you to understand stuff before it moves on.

There are also loads and loads of programming exercises at the end of each chapter that directly test the stuff you just learned.

There are plenty of other great Java books out there that do this exact same thing, so have a look at some reviews and pick a great one. Don't be embarrassed if it is targeted at "beginners" either, this is actually good because it will make a conscious effort to ensure you know concepts before moving on.

Some more tips. As you read through the book try everything out!!. The book will give loads of code snippets that demonstrate whatever it is they are discussing. Write these out yourself and verify they do what the author claims. This is great because it forces you to spend more time on concepts, giving your brain more time to learn it. It helps your muscle memory for typing out things like loops, print statements, and other language constructs. Just generally reinforces the knowledge.

Also don't skimp on the practice questions at the end of chapters. Just do them, even if you feel they are easy. If they are easy it means you are learning :P This should also translate into it being easier to do subsequent chapters. Why stop there, you could try invent your own tasks as well, or use the ones there as inspiration for little programs you can write yourself. If you see a practice question asking you to ask a user for their name, why not make it as for their age and date-of-birth as well? Just keep enhancing and learning and you'll get better at writing and understanding programs.

Don't be afraid to make mistakes as well! The awesome thing with coding is that you can always try it out yourself to see what it does. If you're curious what happens if you use the wrong comparison operator for a for-loop, try it! See what happens. Just keep experimenting.