It isn't very clear what you are trying to say, but it seems like you are telling that you can read and understand Java programs/codes and you want to learn how to write them too. Well, this sounds very strange to me. It seems like you choose the wrong way of learning the language by trying to understand the codes first before the basics of the language. If you do not entirely understand the codes you claim to roughly read, I'd recommend you to start from the very beginning with a clearer and more concentrated mind.
To begin with, if you are completely new to programming, you'd have to go through the basics of programming minutely. If you already know a programming language from before, your life would be a bit easier than that. That being said, it would be a little better if you read about Object Oriented Programming (OOP) just to gain a concept about how Java works. Use
"this" link to read few things about OOP.
Depending on your previous programming experience, you could either try your hands on some easy codes now or you could spend some more time with the theory like understanding the data types, access specifiers, etc.
Lean more about java from
"here"