Home  >  Article  >  Java  >  What does '...' mean in java

What does '...' mean in java

王林
王林Original
2019-11-18 11:00:0815221browse

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();
}

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!

Statement:
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