Home > Java > JavaBase > Commonly used classes in java——Arrays

Commonly used classes in java——Arrays

王林
Release: 2019-11-28 15:15:00
forward
2016 people have browsed it

Commonly used classes in java——Arrays

Overview

java.util.Arrays This class contains various methods for manipulating arrays, such as sorting and search etc. All its methods are static methods and are very simple to call.

Methods for operating arrays

public static String toString(int[] a) : Returns the string representation of the specified array content.

Free online video teaching: java video tutorial

Example:

Commonly used classes in java——Arrays

public static void sort (int[] a) : Sort the specified int array in ascending numerical order.

Example:

Commonly used classes in java——Arrays

Exercise

Please use the relevant API to convert a All characters in a random string are arranged in ascending order and printed in reverse order.

Example:

Commonly used classes in java——Arrays

More related articles and tutorials are recommended:java entry program

The above is the detailed content of Commonly used classes in java——Arrays. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template