How long does it take to understand Java pretty well, and be able to make a program from scratch?
"Understanding something well" is a relative term. Computer programming has so many levels of understanding that the first part of your question is unfortunately almost entirely meaningless.
After your first two weeks of studying a computer programming language, even though you will only know a few rules of the language,
you should know enough to make a program from scratch. A "Hello World!" program is an example. In addition, you should be writing programs from scratch every week, if not every day, as part of your course of study. So, when you say you've been studying Java for 6 months, and you are wondering when you'll be able to write a program from scratch, it's a little bit baffling.
Learning computer programming involves studying the basic rules of the language, and then applying those rules to solve a problem. At first, you concentrate on simple problems, so that you can learn the syntax of the language and acquire a basic understanding of how the rudiments of the language work. An example would be using a for-loop to display the numbers 1-10. Or, using a for-loop to store the numbers 1-10 in an array, and then using a second for loop to add up the numbers stored in the array, and then displaying the total.
After that, it's a matter of applying the language features you know in more creative ways to solve more and more complex problems. In addition, the more you study, the more you will learn about the more advanced capabilities of the language, e.g. regular expressions. And, since Java is such a vast language, you could spend a lifetime studying and learning the complexities of the language. Or, you may end up specializing in one area of Java and get to know that area extremely well, while not knowing a great deal about other areas of the language.
Good luck.
[ September 30, 2006: Message edited by: sven studde ]