Possible Duplicate:
Resources for Java coding style?
So I picked java as my first language to learn and in the book I am reading they defined a variable like so
int apples;
apples = 20;
Then I went off on my own to try the example and wrote it like below and it still compiled without any errors and i didn't notice the difference until now.What I want to know is why the way i wrote it worked and which is the better way to write it so I don't start developing any bad habits. TY in advance =D
int Var=3;