Results 1 to 2 of 2
Thread: Meaning of "String..."
- 05-28-2010, 11:58 PM #1
Member
- Join Date
- May 2010
- Location
- France, Paris
- Posts
- 9
- Rep Power
- 0
Meaning of "String..."
Hello everybody,
Do you know what is meant by "String..." in this code?
Thank you.Java Code:public BroadMulticast(InetAddress multicastAddress, int port, int bufferLength, String... interfaceNames) throws IOException { this(multicastAddress, port, bufferLength, buildInterfaces(interfaceNames)); }
- 05-29-2010, 12:10 AM #2
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 12: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
-
string comparison with "=" and ".equal"
By guavajuice in forum New To JavaReplies: 9Last Post: 04-22-2010, 09:01 PM -
what is the meaning of "@" in java
By itaipee in forum New To JavaReplies: 3Last Post: 08-03-2009, 11:17 AM -
final String currentWorld = "Java Forums"; String.format("Hello %s", currentWorld);
By mcfrog in forum IntroductionsReplies: 0Last Post: 04-02-2009, 07:02 PM -
MoneyOut.println("It took you (whats wrong?>",year,"<WW?) years to repay the loan")
By soc86 in forum New To JavaReplies: 2Last Post: 01-24-2009, 06:56 PM -
the dollar sign "$", prints like any other normal char in java like "a" or "*" ?
By lse123 in forum New To JavaReplies: 1Last Post: 10-20-2008, 07:35 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks