declare arraylist in one line java code example Example: initialize arraylist in 1 line in java Arrays.asList("Code", "Shifter");