Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2007

Tip: Looking for answers? Try searching our database.

method (String ... var) what does this mean?

Thread view: 
Ming - 21 Nov 2007 22:59 GMT
What does the three dots after string mean?

I have a class that have a method itemLookup(ItemLookupRequest...
request)

I pass an ItemLookupRequest object to the method and it is wrong. What
does the three dots mean?

Thanks,
Daniel Pitts - 21 Nov 2007 23:08 GMT
> What does the three dots after string mean?
>
[quoted text clipped - 5 lines]
>
> Thanks,
The three dots means its a varargs method, it can take zero or more
ItemLookupRequest objects...

By "it is wrong", do you mean it doesn't do what you expect, or that you
get a compiler error?  Copy and paste the exact error you're getting.

Signature

Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>

Ming - 21 Nov 2007 23:14 GMT
Thanks for reply.

It is a compiler error

Thanks for reply.

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,

On Nov 21, 3:08 pm, Daniel Pitts
<newsgroup.spamfil...@virtualinfinity.net> wrote:
> > What does the three dots after string mean?
>
[quoted text clipped - 14 lines]
> --
> Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
Daniel Pitts - 22 Nov 2007 00:07 GMT
> On Nov 21, 3:08 pm, Daniel Pitts
> <newsgroup.spamfil...@virtualinfinity.net> wrote:
[quoted text clipped - 33 lines]
>
> Thanks,

Please don't top post in the future.

What version of Java are you using?  Try compiling it, and paste the
*exact* message.

Signature

Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>

Roedy Green - 22 Nov 2007 06:07 GMT
>I pass an ItemLookupRequest object to the method and it is wrong. What
>does the three dots mean?

see http://mindprod.com/jgloss/dotdotdot.html
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

ricardorq85@gmail.com - 22 Nov 2007 16:03 GMT
Maybe your method is overloaded.

May you show the entire source?

Roedy Green ha escrito:

> >I pass an ItemLookupRequest object to the method and it is wrong. What
> >does the three dots mean?
[quoted text clipped - 4 lines]
> The Java Glossary
> http://mindprod.com


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.