Solved

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

Posted on 2007-11-21
6
1,554 Views
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/
amazon/webservices/test AWSTest.java

Thanks
0
Comment
Question by:tiger0516
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 86

Accepted Solution

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

Expert Comment

by:CEHJ
ID: 20331917
0
 
LVL 92

Assisted Solution

by:objects
objects earned 20 total points
ID: 20331942
thats the new(ish) varargs feature add in 1.5
see here for some details

http://java.sun.com/developer/JDCTechTips/2005/tt0104.html#1
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

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

Expert Comment

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

Expert Comment

by:CEHJ
ID: 20476706
:-)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
eclipse buid path vs tomcat lib path 10 38
Java: anonymous class 4 39
Java 8 to Java 6 8 33
wild fly 8 startup error 2 43
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
This video teaches viewers about errors in exception handling.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

730 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