I have to make a constructor for an ArrayList. So basically what I want is that this constructor makes an ArrayList.
public Recipe(String[] modifications){
The problem is, it should give something like(example):
String[] modifications = [heatup, cooldown, mix, heatup]
Will the constructor work like this:
Recipe(heatup, cooldown, mix, heatup)
or do I need to change it to somethign like:
Recipe(modifications){
this.myArrayList[1] = modifications[1]
.
.
.
}
thank you and sorry if there are some big mistakes in my code, still learning my Java code.