Don't get Java Arrays

I am a freshman at my university and I have programming One among other classes. My math skills suck ass and so I am doing college algebra (which is too fucking easy but I'm getting there), but I think I failed my first test since high school today.

The test was mainly on arrays and 2D arrays in Java. From a guy who has been doing really well in the class so far (96/100 total grade), I feel like absolute shit for what I believe is bombing this exam (probably scored a D or a C).


Is there any hope for me, Veeky Forums? Can I still become a programmer? Did you awesome coders ever have a hard time learning something in programming?

Retarded CS majors belong in

But I'm not only majoring in CS, user. I was even thinking of switching over to CE, since my brother and father are computer engineers.

My granfather is an electrical engineer and my half uncle works in IT.

>My math skills suck ass and so I am doing college algebra, but I think I failed my first test since high school today.

Yeah, no.

>replying to bait
Literally apply your replies to yourselves.

But user I'm starting to git gud! I think I will have little to no difficulties in more advanced mathematics.

However, why the fuck are arrays so hard to understand? I know how to make one and such, but actually putting them to use is difficult.

How is it possible to not understand arrays?

Arrays = buckets numbered
Think like that

Especially in Java, I mean I would understand being confused with and array of pointers to arrays of pointers in C but Java... come on

Bruh, if you couldn't understand neural nets - kinda aight. Many people struggle to understand how exactly the inputs are processed (at least before implementing it).

I can't believe tho, you really tried to learn arrays and don't get it lazy fuq

If you can't understand arrays in Java, you may wanna find another field. What do you not understand? A 2d array is just an array of 1d arrays.

t. CSfag

I understand that. What I don't get is when I have to implement them. I' having the hardest fucking time creating a tic tac toe game. I created the game, but the fucking computer keeps fucking putting its 'o' where my 'x' is placed and IDK what the FUCK to do to make it stop.

I get it, the concept isn't hard, it's the application.

if you werent born retarded you probably would have learned about OOP arrays on your own time in middle school like a normal person

Software dev for 3 years here. Mostly java.

Yes, some concepts take time to understand. You were being lazy if you failed to comprehend it in time for the exam.

you do remember to start indexing at 0 right?
and that lines come before columns?
what else is there to it

The while, if and for loops that go with arrays. Its just so many variables. A student with college algebra just isn't used to this caliber of logic. All of my classmates taking this class are at Calculus 2 or more and they're having a blast.

Mostly used with loop structures, in my humble XL experience: fill or read the array via a "Do While..." "Do Until..." or similar. Sorry, no Java experience at all.

Work on one dimension at a time until you get more experience. Get the right results with 1 dimension (say rows) and test with various conditions. This would be a single row of the tic-tac-toe grid. When happy, add in or restore (remove 'commenting out'?) another dimension. Repeat for 3rd dim. etc.
Computer uses your tic-tac-toe cell? Ned ANOTHER array or another dimension of the same array to store which cells have been used by either computer or person(s).
Oh, I just flashed on 3D-tic-tac-toe!

I mean unless you are doing linear algebra you don't need math to understand arrays.

I guess I don't really understand what you don't understand.

I FIXED IT BOYS

I was making the board print the letter IN the do while loop, so of course the loop went on forever. I meant for it to keep generating random numbers that would go into the 2D array in order to finally find an index within the board without a letter. I tested it and it worked...

that was the dumbest fucking bug.

Good job. Is this your first CS class?

3/10
Sadly this is the case for many in CS

Yeah it is my first. I wanted to be in international relations before this.

Also, I was a hardcore hater of math because I've always been terrible at it. Then again I had shit teachers and so I never really applied myself. I wanted nothing to do with math and I am very fucking good at writing.

But writing is fucking gay and makes you poor and I really like not having to write bullshit essays. Plus I grew up around computers. I love programming I just want to git gud at math already.