Var-Arg in Java

March 26, 2007 at 6:51 pm Leave a comment

Var-Arg
It means variable arguments.. It is a type of java argument.How many of you know that this type of argument in the method declaration.. I came across this recently and checked it out .
the syntax: you follow the type with the ellipsis(…), a space and then the name of the array that will hold the parameter received

public int returnName(String… name){}
public int test(int i,int… name){}

More about it…
Here other parameters can exists
It must be the last parameter
We can have only one var-arg in  a method

powered by performancing firefox

Entry filed under: Friends, Love, study, technical. Tags: .

“Oh my god , Chandramuki” FBO~Google~Warrior

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


March 2007
S M T W T F S
« Feb   Apr »
 123
45678910
11121314151617
18192021222324
25262728293031

Blog Stats

  • 225,814 hits

Java software

Flickr Photos

Morning Silence

Puffy

Emerald Damselfly ♀

More Photos

%d bloggers like this: