package com.Summer_0420.cn; import java.util.Arrays; /**
* @author Summer
* binarySearch(int[] a,int fromIndex,int toIndex, int key)的用法(测试)
*/
public class TestMethod05 {
public static void main(String[] args) {
int [] a = {1,2,3,4,5,6,7,8,9,10};
int index = Arrays.binarySearch(a, 3, 9, 6);//(数组,起始索引,结束索引,搜索值)
System.out.println(index);
}
}
相关文章
- const int是什么类型_Const的几大用法(常用)
- c语言中strtoint的用法,C++ String(字符串)和 int(整数) 互转
- c语言int作用,c语言中int的用法有哪些
- python中int的功能_Python内置函数int高级用法
- c++ new int的用法
- C++读写TXT文件中的string或者int型数据以及string流的用法 - wu_xin
- python的memcache使用如果对key设置了一个int型
- char* strcpy( char* dest, const char* src ), int binary_search(int *arr, int key, int n), 可能的实现
- asp中的几个取整函数fix(),int(),round()的用法
- int在python中的含义以及用法