What does the three dots in method parameters mean (like method (String... s)

Posted on 2007-11-21
Last Modified: 2013-12-29
Code snippet:

AmazonECS service = new AmazonECSQuery(accessKeyId, associateTag);
ItemLookupRequest request=new ItemLookupRequest();
ItemLookupResponse response = service.itemLookup(request);

Eclipse complains that

The method itemLookup(ItemLookupRequest...) in the type AmazonECS is
not applicable for the arguments (ItemLookupRequest)    Test/src/com/

Question by:tiger0516
  • 3
  • 2
LVL 86

Accepted Solution

CEHJ earned 30 total points
ID: 20331914
That mean a variable number of arguments
LVL 86

Expert Comment

ID: 20331917
LVL 92

Assisted Solution

objects earned 20 total points
ID: 20331942
thats the new(ish) varargs feature add in 1.5
see here for some details
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.


Author Comment

ID: 20331964
It the length is variable, why I get a complier error when passing just one?
LVL 92

Expert Comment

ID: 20331972
are you sure you are using the same class as expected (and not one with samne ane from another package)
LVL 86

Expert Comment

ID: 20476706

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
groupNoAdj 7 95
Way to decrease size of apk file 9 67
type mismatch (Object[] to double[] 4 24
jsp login check 12 31
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question