Java Arrays

Posted by chaimoosh on November 7, 2018

As I continue learning Java I’m starting to see how similar it is to what I’ve already learned in Ruby and Javascript. However there are some very apparent differences as well. At first glance it looks pretty similar to Javascript because the both use brackets to contain everything within functions and they use some similar words. But in some ways they are really different. Like when it comes to arrays in Javascript you can make an array and it can contain whatever you want like numbers or strings or objects but in Java when you declare an array you have to declare what type of values it will hold like if you want it to hold integers when you initialize the array you have to say it’s going to be an array of integers which is going to take some getting used to.