aspose file tools*
The moose likes Beginning Java and the fly likes method declaration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "method declaration" Watch "method declaration" New topic
Author

method declaration

Swathi Rangudu
Greenhorn

Joined: Sep 07, 2008
Posts: 4
How to declare a method with n-number of arguments in java?Please give me any idea..

Thanks in advance...
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41869
    
  63
Do you mean varargs?


Ping & DNS - my free Android networking tools app
Swathi Rangudu
Greenhorn

Joined: Sep 07, 2008
Posts: 4
I mean can we declare a method like printf() in C (example) which it takes n-number of arguments at runtime
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19696
    
  20

Originally posted by Ulf Dittmer:
Do you mean varargs?

Quoted for relevance and importance. Just read it


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38865
    
  23
Originally posted by Rob Prime:
. . . Just read it


Read this Java Tutorial page too.
Swathi Rangudu
Greenhorn

Joined: Sep 07, 2008
Posts: 4
yes....
 
Don't get me started about those stupid light bulbs.
 
subject: method declaration