Good afternoon fellow greenhorns,
I'd like to take a second to introduce myself (on top of the question of course); my name's Elvin and I'm an I.T. student at Florida International University. At the moment I am going through some issues learning java and would like someone's assistance in completing the problem. I already know the answer to the problem but that's not what I'm looking for, I want to understand why my code doesn't work as opposed to the code that I found online. Provided is a link to the problem so that you may all see it (basically, in an array, if there is a 2, directly next to another 2 [in the elements of the array] return true, else return false. Seems simple enough right? WRONG! Below is my code and below that is the code that works.
My code:
---------------------------
working code:
----------------
Someone please cure this ache of mine.... thanks in advance for all replies!