Question: What happens when you pass an ArrayList to a method with an ArrayList parameter variable? Try it out and explain.
What happens when you pass an ArrayList to a method with an ArrayList parameter variable? Try it out and explain.
Step by Step Solution
3.38 Rating (151 Votes )
There are 3 Steps involved in it
When you pass an ArrayList to a method with an ArrayList parameter variable Java passes the reference to the ArrayList instead of making a new copy Th... View full answer
Get step-by-step solutions from verified subject matter experts
