Getting the Location from a ArrayList

Discussion in 'Plugin Development' started by nite, Sep 11, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    nite

    So I have 2 ArrayLists that look like this,
    Code:java
    1. public static List<Location> loc1 = new ArrayList<Location>();
    2. public static List<Location> loc2 = new ArrayList<Location>();

    After I set the location in these ArrayLists how would I get the location from it?
     
  2. Offline

    _Cookie_

    Code:java
    1. if(loc1 != null){
    2. loc1.get(0);
    3. }

    ??? That just checks if the ArrayList has anything in it if it does, then it gets the first thing in the ArrayList.
     
  3. Offline

    teej107

Thread Status:
Not open for further replies.

Share This Page