一行代码搞定
import java.util.*; import java.util.stream.*; public class Solution { public String PrintMinNumber(int [] numbers) { return Arrays.stream(numbers).mapToObj(String::valueOf).sorted((o1, o2) ->(o1 + o2).compareTo(o2 + o1)).collect(Collectors.joining("")); } }