Home > Java > JavaBase > body text

What does '...' mean in java

王林
Release: 2019-11-18 11:00:08
Original
15155 people have browsed it

What does '...' mean in java

Explanation:

Variable length parameter means that any number of parameters of this type can be passed in at this position. Simply put, it is an array.

If it appears in a formal parameter, it means a variable parameter, which means that the number of parameters passed in is variable. How many parameters you pass will be placed in an array.

For example:

public static void dealArray(int...intArray) {
    for(int i: intArray)
    {
        System.out.print(i +" ");
    }
    System.out.println();
}
Copy after login

Recommended tutorial: Java tutorial

The above is the detailed content of What does '...' mean in java. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!