damon greenfield wrote:When i first starting writing this code, I did have it in all Int's but after research i read I would get an error if the number that was returned had a decimal in it.. So i switched to double.
Liutauras Vilda wrote:3. When you write if statement, before you place opening parentheses you should add space character, so it would read "if (something)" rather than "if(something)".
Hi, I'm fairly new to java too and I know what you mean. All I learned at university was a few hours of theory on algorithms, with no practice in programming whatsoever.
damon greenfield wrote:The professor did not teach us any syntax at all. I didnt even know how to start off a basic java code until this semester.
Even then, I wouldnt know how to change anything if I had to do another kind of project.
I found some good youtube videos from Nathan Schutz, who explains some basic and some stuff that I can understand.
I will see if I can get that clean code book from amazon and download to my kindle/computer.
Carey Brown wrote:But other than dictated style this is a personal preference and not a "should".
Junilu Lacar wrote:I disagree! An if should always be followed by a space. Let the space and bracket wars begin!...