How to use java.util.Arrays

后端 未结 5 1525
挽巷
挽巷 2021-01-02 09:03

I\'m trying to use the java.util.Arrays class in JavaSE 6 but not sure how i would implement it? on an array that I have generated?

before the start of the class i

5条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-02 09:43

    You can use a static import

    import static java.util.Arrays.*;
    
    int[] ints = {3, 4, 1, 2, 5, 7, 6};
    sort(ints);
    

提交回复
热议问题