Arrays:用于操作数组的工具类,
里面都是静态方法,
static int binarySearch(int[] a,int key)
import java.util.Arrays; public class Solution { public void fun(int[] R) { Arrays.sort(R); } public static void main(String[] args) { Solution s=new Solution(); int[] R={5,3,6,3,53,214,56,7,64}; s.fun(R); for(int i=0;i<R.length;i++) { System.out.println(R[i]); } } }