Life time of a variable within a class

2

how I have a project where you read a csv file of thousands of lines a column of the CSV I save it and send it to a class where a list feeds my question is how long life has that list. once finished it will restart. or how would the lifetime of said list be

    
asked by Monster 25.01.2018 в 20:18
source

1 answer

1

The list will be maintained for as long as the program is running. or as long as the object that contains the list does not become null or re declared. Since in case of re-declare you will have to load the list again.

There are cases in which java eliminates "garbage", but this happens only when there are "live" objects, which are not being used (No class has instantiated them).

However, I do not think this last is your case.

    
answered by 25.01.2018 / 20:26
source