Java ArrayList replace at specific index

I need help with this java please. I created an ArrayList of bulbs, and I’m trying to replace a bulb at specific index with another bulb. So with the following heading, how do I proceed?

public void replaceBulb(int index, Bulbs theBulb) {

}

Leave a Comment