This tutorial was created with Roy Nunez. To learn the basics of ArrayList check out their tutorial HERE. As a refresher, an ArrayList is like an Array without a set size. Unlike Arrays however, ArrayLists can only consist of Objects and cannot hold primitive data types like ints and booleans. If you want to make …
Category Archives: Uncategorized
Working the Magic: Interview Questions
Question 1: What’s the value of “nums” after executing the following code? Turns out this is a trick question. Arrays in Java start counting from zero so if you try to access the index of your Array’s length, you’ll try to access an index the Array doesn’t have crashing Java. Question 2: To be Added
Java Cantrips: Arrays
So you’ve picked up the building blocks of Java. You feel comfortable creating a Variable, you’ve created Loops and If statements, you may even have Instantiated an Object. Now you find that to complete your next project, you need more than one of the same Object. You could create an Instance for each Object you …