Solved Turning String[] to a list?

Discussion in 'Plugin Development' started by Eggspurt, Jun 28, 2015.

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

    Eggspurt

    map.put(p, new String[]{"Miner", "Minee", "Test1", "Test2"});


    How would I print out each one of those?

    map.values().toString(); gives language error.
     
  2. Offline

    Konato_K

    @Eggspurt Iterating though the array is an option, using Arrays#toString(Object[]) should work aswell.
     
    Eggspurt likes this.
  3. Offline

    Eggspurt

    Would you happen to have an example?
     
  4. Offline

    tytwining

    Why can't you just do this with keeping it as a String[].

    Code:
    for(String string : list) {}
     
Thread Status:
Not open for further replies.

Share This Page