Skip to main content
added 89 characters in body
Source Link
Andrii Abramov
  • 10.9k
  • 12
  • 81
  • 107

Since Java 8 there is an easier way to transform:

import java.util.List;    
import static java.util.stream.Collectors.toList;

public static <T> List<T> fromArray(T[] array) {
    return Arrays.stream(array).collect(toList());
}

Since Java 8 there is an easier way to transform:

public static <T> List<T> fromArray(T[] array) {
    return Arrays.stream(array).collect(toList());
}

Since Java 8 there is an easier way to transform:

import java.util.List;    
import static java.util.stream.Collectors.toList;

public static <T> List<T> fromArray(T[] array) {
    return Arrays.stream(array).collect(toList());
}
added 3 characters in body
Source Link
Andrii Abramov
  • 10.9k
  • 12
  • 81
  • 107

Since Java 8 there is an easier way to transform:

public static <T> List<T> fromArray(T[] array) {
    return Arrays.stream(array).collect(toList());
}

Since Java 8 there is easier way to transform:

public static <T> List<T> fromArray(T[] array) {
    return Arrays.stream(array).collect(toList());
}

Since Java 8 there is an easier way to transform:

public static <T> List<T> fromArray(T[] array) {
    return Arrays.stream(array).collect(toList());
}
added 6 characters in body
Source Link
Andrii Abramov
  • 10.9k
  • 12
  • 81
  • 107

Since Java 8 there is easier way to transform:

public static <T> List<T> getfromArray(T[] array) {
    return Arrays.stream(array).collect(toList());
}

Since Java 8 there is easier way to transform:

public static <T> List<T> get(T[] array) {
    return Arrays.stream(array).collect(toList());
}

Since Java 8 there is easier way to transform:

public static <T> List<T> fromArray(T[] array) {
    return Arrays.stream(array).collect(toList());
}
Source Link
Andrii Abramov
  • 10.9k
  • 12
  • 81
  • 107
Loading