Using Arrays as Variables.
Im a beginner with Java and I need some help with a project that I am working on. As a start, I am unfamiliar with 'types'. But more importantly I need to add objects, more specifically arrays, to an arraylist. This i believe that I succeeded in as arraylists allow objects to be added as elements with basic code. I named the arraylist as megaArray. I want to be able to run a for loop starting with x at 0, adding one to the integer each time it loops around. Using this for loop, I want to be able to search the index of every array in megaArray to see if it has a certain object as an element, which i put as a parameter. The code that I am setting up to accomplish this is not working. The code, or thought process is as follows;
public void someMethod (object c)
for (int x = 0; x < 15...number of arrays in the arraylist...; x++) {
megaArray[x].findIndex (object c)
//each object is n element in 3 of the 15 arrays within megaArray
//after it returns an integer >= 0, if the array contains the object, or another integer, of which I don't know, if the array does not contain the object
//how do i get the computer to acknowledge those three arrays? is there any way i can give those three arrays a variable name?
thank you very much for your time, i know that this may be incredibly basic but im new to programming, and especially OOP.