• + 0 comments

    Don't make want to make code is too coplicated to see for the beginers.

    //Just on default package - collections

    Collections.sort(arr); long Max=0L; long Min=0L; for(int A =0;A-1;B--){ if(B!=arr.size()-1){ Min=Min+arr.get(B); } } System.out.print(Min + " " +Max);