// Java
String string = "aaaabbbcc";
List<Character> chars = new ArrayList<>();
IntStream.range(0, string.length()).forEach(index -> chars.add(string.charAt(index)));

List<String> fruits = Arrays.asList("apple", "banana", "orange");


// Kotlin:
val list = "aaabbbcc".toList()
val fruits = listOf("apple", "banana", "orange")

deck

By Lucas Rodrigues

deck

  • 302