Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Initialize ArrayList to empty list

$
0
0
HI everyone!

So for my program, I need to create and ArrayList and then in a method initialize it to an empty list. I will post my program here so you guys know what I'm talking about. I need to initialize it to the empty list in the BusStop method.


import java.util.ArrayList;

public class BusStop extends Location {
	
	protected java.util.ArrayList<Line> lines;
	
	public BusStop() {
		
	}

}


Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>