A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

 找回密码
 加入黑马

QQ登录

只需一步,快速开始

© hi潘 中级黑马   /  2015-6-16 13:45  /  114 人查看  /  0 人回复  /   0 人收藏 转载请遵从CC协议 禁止商业使用本文

static int binarySearch(type[] a, type key) 使用二分搜索法来搜索key元素在数组中的索引;若a数组不包括key,返回负数。(该方法必须已按升序排列后调用)。
static int binarySearch(type[] a, int fromIndex, int toIndex, type key) 使用二分搜索法来搜索key元素在数组中从fromIndex到toIndex的索引;若a数组不包括key,返回负数。(该方法必须已按升序排列后调用)。
static boolean[] copyOf(type[] original, int newLength) 复制指定的数组见下面备注
static byte[] copyOfRange(type[] original, int from, int to) 将数组的指定范围复制到一个新数组。
static boolean equals(type[] a, type[] a2) 如果两个数组长度相等和元素一一相等,则返回 true
static void fill(type[] a, type val) 将a数组所有元素都赋为val。
static void fill(type[] a, int fromIndex, int toIndex, type val) 将a数组从formIndex 到tiondex索引之间的元素都赋为val。  
static void sort(type[] a) //sort(int[] arr)对指定的数组按数字升序进行排序。
static void sort(type[] a, int fromIndex, int toIndex) 对指定数组的从formIndex 到tiondex索引之间的元素按数字升序进行排序。
static String toString(type[] a) 返回指定数组内容的字符串表示形式。多个数组元素之间用英文逗号或空格隔开。

0 个回复

您需要登录后才可以回帖 登录 | 加入黑马