File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes regarding var-args Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "regarding var-args" Watch "regarding var-args" New topic
Author

regarding var-args

RatnaSekhar Kamireddy
Greenhorn

Joined: Aug 28, 2006
Posts: 3
hi this is ratna sekhar . i am preparing scjp.
i have finished first chapter in kathy sierra and bret bates.
In first chapter , there is a new topic regarding var-args.
they gave the syntax of how to declare the var-args and how to use(invoke);
but they didnt give regarding of definition of that method.
how the arguments in the var-arg method initialized.
please tell me in depth
ok bye
Gowher Naik
Ranch Hand

Joined: Feb 07, 2005
Posts: 643

Check code above it shows all details about var args.
wise owen
Ranch Hand

Joined: Feb 02, 2006
Posts: 2023
Chapter 5: Creating Varargs in Java 1.5 Tiger
Burkhard Hassel
Ranch Hand

Joined: Aug 25, 2006
Posts: 1274
gowher amin naik recently wrote:

Hi, to make it clearer it should have been:

Yours,
Bu.


all events occur in real time
Vijay Vaddem
Ranch Hand

Joined: Feb 13, 2004
Posts: 243
Hi,

You would find varargs very handy when you need to write a method which could take 'n' number of parameters for a given argument.

It is equivalent to writing a method which takes an array argument.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: regarding var-args
 
Similar Threads
Query on var-args in java
KS&BB SCJP Study Guide Self Test Chap 2 Question 15
Method overloading
confusion in methdo overloading with var args
Questions about method overloading and throwing exceptions...