Results 1 to 2 of 2
  1. #1
    kracer is offline Member
    Join Date
    May 2010
    Location
    France, Paris
    Posts
    9
    Rep Power
    0

    Default Meaning of "String..."

    Hello everybody,

    Do you know what is meant by "String..." in this code?
    Java Code:
     public BroadMulticast(InetAddress multicastAddress, int port, int bufferLength, String... interfaceNames) throws IOException {
        this(multicastAddress, port, bufferLength, buildInterfaces(interfaceNames));
      }
    Thank you.

  2. #2
    Lil_Aziz1's Avatar
    Lil_Aziz1 is offline Senior Member
    Join Date
    Dec 2009
    Location
    United States
    Posts
    343
    Rep Power
    5

    Default

    the . . . means one can do this:

    public BroadMulticast(someInetAddress, somePort, someBufferLength, stringOne, stringTwo, stringThree, stringFour, ...)

    or

    public BroadMulticast(someInetAddress, somePort, someBufferLength)

    or


    public BroadMulticast(someInetAddress, somePort, someBufferLength, stringOne)

    It's like the System.out.printf() method
    for an article on this, check out http://java.sun.com/docs/books/tutor...arguments.html under the heading "Arbitrary Number of Arguments"
    Last edited by Lil_Aziz1; 05-29-2010 at 01:14 AM.
    "Experience is what you get when you don't get what you want" (Dan Stanford)
    "Rise and rise again until lambs become lions" (Robin Hood)

Similar Threads

  1. string comparison with "=" and ".equal"
    By guavajuice in forum New To Java
    Replies: 9
    Last Post: 04-22-2010, 10:01 PM
  2. what is the meaning of "@" in java
    By itaipee in forum New To Java
    Replies: 3
    Last Post: 08-03-2009, 12:17 PM
  3. Replies: 0
    Last Post: 04-02-2009, 08:02 PM
  4. Replies: 2
    Last Post: 01-24-2009, 07:56 PM
  5. Replies: 1
    Last Post: 10-20-2008, 08:35 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •