从源码分析Arrays类的常用方法

文章目录

  • Arrays类概述
  • 常用方法
    • 排序sort
    • 搜索binarySearch
    • 比较equals
    • 填充fill
    • 赋值copyOf
    • 将数组转换成列表asList
    • 获取哈希码hashCode
    • toString

Arrays类概述

Arrays类在源码中的声明:

/**
 * This class contains various methods for manipulating arrays (such as
 * sorting and searching). This class also contains a static factory
 * that allows arrays to be viewed as lists.
 *
 * 

The methods in this class all throw a {@code NullPointerException}, * if the specified array reference is null, except where no

你可能感兴趣的:(java源码,java,开发语言,Arrays,源码,数组)