Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

This topic was taken from Stack Overflow, but it was put on-hold due to Opinion-based question. So I moved it to here.

I've had some great troubles with my homework exercises and I've used excessive time on doing simple programs like arrays and methods. For example it took me over 20 hours to create a program that asks user to enter row and columns size and then prints the matrix. I've read over 20 java books and tried 4 MOOCs, and even Buckys videos but it feels like I won't get in-depth understanding of Java fundamentals.

Here's a list of problems that I face everyday when I'm coding java:

  1. Problem solving
  2. Creating methods and using them
  3. Arrays
  4. "I've no idea how to do this"
  5. What is constructor and how to use it
  6. "Where can I find help?"

I've asked this question before but the answers have been like: "Read books" or "Just start coding" but neither of these haven't helped me because I've tried to code, but I haven't had any reasonable goals and reading books feels like eternal loop that just leads nowhere.

I know that Internet is full of 'What is the best way to learn Java'-questions but I think that I've to try ask this because this topics question does not appear in Google Search + I think that there are people who are struggling with the same problem.

Any advice would be appreciated. I'm eager to learn Java, I just need to find my own way to do it!

share|improve this question

closed as primarily opinion-based by MichaelT, Kilian Foth, psr, Bart van Ingen Schenau, Jalayn Aug 1 '13 at 12:15

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

Be aware that our closing rules are largely similar to Stack Overflow's even if our scope is different. Some people on Stack Overflow are not aware of this. –  World Engineer Jul 26 '13 at 13:52
@WorldEngineer Any advice how to avoid this? I've read help/behavior but it feels like there are some unwritten rules here. –  Javan00b Jul 26 '13 at 15:30
1) Just practice. 2) Use Eclipse to help you get used to java syntax. Use ctrl-space a lot. This is critical! 3) Arrays (like Exceptions and generics) are unique structures in Java, just take some getting used to. Take them on slowly. 4) Google it. Seriously. 5)constructors are just methods with a few special properties (slightly different syntax and that they are invoked with the "new" keyword). 6) Google –  Bill K Jul 26 '13 at 16:25

2 Answers 2

You won't like this answer because you've already heard it.

Go code!


At some point, coding becomes an experiential thing. You have to "do it" in order to "get it." You're there. So go code.

but I haven't had any reasonable goals and reading books feels like eternal loop that just leads nowhere

Then fix your expectations and goals. Make them reasonable so you can get a sense of accomplishment. If you're comparing yourself to the folks that are putting out languages or frameworks or whatever that you admire so much, then you need to stop. They've got years and decades of experience coding things which is what drives their knowledge.

You call yourself a n00b, meaning a beginner. Well, it's unfair to compare a beginner to a seasoned veteran of the field. So stop it already.

Go code some. Uncover specific problems, come back for answers on solving those problems. Go code some more.

share|improve this answer
Sounds like "divide and conquer"-tactic? Well that's a good tip! –  Javan00b Jul 26 '13 at 15:31
+1: There's a reason why the common answer to this question is "go code" then "code moar!". –  Deco Jul 29 '13 at 1:36

Inspect open-source code is a good way to learn, too. In the case of Java I give you the advise to check how the classes from rt.jar are implemented. Or take a basic class like String, try to implement it yourself and compare the result with the actual implementation. Then ask yourself why they have done it the way they did and note the advantages against your implementation.

When using eclipse (or another IDE where this is possible), it's always a good idea (for both beginners and advanced) to configure the source-base of used libraries, so you can jump easily to the readable source of an class to have a peek what's going on there ;)

share|improve this answer
That seems to be useful advice, thought I'm not that experienced that I could start doing my own String classes. Maybe later when I've learned more. –  Javan00b Jul 26 '13 at 15:33
Don't be shy about... what's a String all about? It's "just a wrapper for an char-array", so this would be the first task: Build a class which has a private Property, holding an variable amount of chars. Then implement functions like toCharArray(), indexOf(), concat() and trim(). Then the core functionality of the String class is already done! The mankind always thinks things are complicated, until they really take a look on it and sees that it's quite simple ;) –  Marvin Emil Brach Jul 29 '13 at 6:55
Again, the String class is one of the base classes with high importance. Over the years the class growth more and more, but it's all clean and very good documented code. Here, have a look at charAt() it's really simple: grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/… –  Marvin Emil Brach Jul 29 '13 at 7:08

Not the answer you're looking for? Browse other questions tagged or ask your own question.