This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
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


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
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: 41634
    
  55
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: 19685
    
  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: 38519
    
  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....
 
 
subject: method declaration