public class SolutionXX { public static void main(String[] args) { ArrayList<String> list = new ArrayList<String>(Arrays.asList(new String[]{"Apple", "Banana", "Carrot"})); list.remove(0); for (String item : list) System.out.printf("%s ", item); } }
clojure
(let [fruit ["Apple" "Banana" "Carrot"] index 0] (concat (take index fruit) (drop (+ index 1) fruit)))
(let [fruit ["Apple" "Banana" "Carrot"] index 0] (concat (take index fruit) (drop (+ index 1) fruit)))
fantom
list := ["Apple", "Banana", "Carrot"] list.removeAt(0)
class SolutionXX { Void main() { list := ["Apple", "Banana", "Carrot"] list.removeAt(0) } }