Elvin Blen

Greenhorn
+ Follow
since Mar 07, 2013
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Elvin Blen

I seem to have forgotten to provide the link, here it is.

http://codingbat.com/prob/p121853
11 years ago
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!
11 years ago