当前位置:网站首页>Arrays class
Arrays class
2022-06-30 04:37:00 【Beginner 891】
● Arrays Class is used to manipulate the array utility class , It defines the static methods for common array operations .
equals Method
● Compare whether two different arrays are equal , And the array itself equals Judge another number Whether the group itself .
● Statement :public static boolean equals(type[]a,type[]a2)
● The type of a parameter can be either a native data type or a reference type .
● return : If two are equal , Then return to true, Otherwise return to false
sort - Sort
● Acts on all elements of the array public static void sort(type[] a)
● Acts on elements in the specified range of the array public static void sort(type[] a, int fromIndex( Include ), int toIndex( barring )) The specified type ( except boolean Any native data type other than ) Array all elements ( Or specified range Elements in the enclosure ) Sort in ascending numerical order . object Type of the array , According to the natural order of the elements , Sorts the array of specified objects in ascending order . (fromIndex==toIndex, The sorting range is empty )
● Custom object sorting Custom class implementation Comparable Interface rewrite compareTo Method
binarySearch - Use the binary search algorithm to search the specified array
● Statement : public static int binarySearch(type[] a, type key)
public static int binarySearch(long[] a,int fromIndex,int toIndex,long key)
● describe : Use the binary search algorithm to search the specified type Type of the array , To get the specified value .
● Parameters : a - Array to search .
key - Value to search .
fromIndex - Index of the first element to sort ( Include ).
toIndex - Index of the last element to sort ( barring ).
type -byte、double、float、object、long、int、short、char
● If key In the array , Then return the index of the search value ; Otherwise return to -1 perhaps ”-“ ( The insertion point )
toString() Method
● Statement :public static String toString(type[] a)
● describe : Returns a string representation of the contents of a specified array .
● Basic array , The string representation consists of a list of elements of an array , Included in [], Adjacent elements use “ , ”( Comma with space ) Separate .
边栏推荐
- [control] multi agent system summary. 1. system model. 2. control objectives. 3. model transformation.
- Bean创建流程 与 lazy-init 延迟加载机制原理
- 【Paper】2015_ Active fault-tolerant control system design with trajectory re-planning against actuator
- SSL update method
- QT 6.3.1conan software package release
- The difference between get and post requests
- internship:接口案例实现
- Troubleshooting of abnormal communication between FortiGate and fortiguard cloud
- FortiGate configures multiple server IPS as link monitor monitoring objects on the same interface
- Threejs realizes the simulation of river, surface flow, pipe flow and sea surface
猜你喜欢

FortiGate firewall and Aruze cloud tunnel interruption

Myrpc version 5

OneNote production schedule

基于servlet+jsp+mysql实现的工资管理系统【源码+数据库】

Bean创建流程 与 lazy-init 延迟加载机制原理

Redis cache avalanche, breakdown and penetration
![[UAV] gyroscope data analysis, taking Victor intelligent jy901b as an example](/img/d7/7bf43437edb87b69cdc5ae858f44e1.jpg)
[UAV] gyroscope data analysis, taking Victor intelligent jy901b as an example

Method of applying for code signing certificate by enterprise

SSL update method

Matlab reads fig file and restores signal
随机推荐
FortiGate firewall configuration log uploading regularly
Memorize unfamiliar words at SSM stage and update them from time to time
The subsystem implementing transaction persistence in DBMS is ()
Introduction to system programming
Use of thread pool
OneNote software
【Paper】2020_ Research on defense and evaluation strategy of heterogeneous UAV formation_ Zuojiankai
Myrpc version 0
The difference between get and post requests
Transport layer protocol tcp/udp
Matlab reads fig file and restores signal
Threadlocal
One interview question a day - the underlying implementation of synchronize and the lock upgrade process
With the deep integration of cloud platform, the "Xueba" objectscale in the object storage industry is coming
【Paper】2017_ Research on coordinated control method of underwater vehicle formation marine survey
Paging query, using jdbc-- paging query
FortiGate creates multiple corresponding DDNS dynamic domain names for multiple ADSL interfaces
7-3 single source shortest circuit for strange play upgrade
FortiGate firewall configuration link detection link monitor and status query
Issue SSL certificate with IP address