wood burning stoves*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes string array varargs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "string array varargs" Watch "string array varargs" New topic
Author

string array varargs

akila sekaran
Ranch Hand

Joined: Jun 12, 2012
Posts: 48
is String...[] args a legal one ?
Alexei Kaigorodov
Greenhorn

Joined: Feb 24, 2008
Posts: 17
akila sekaran wrote:is String...[] args a legal one ?

No.
gurpeet singh
Ranch Hand

Joined: Apr 04, 2012
Posts: 924
    
    1

akila sekaran wrote:is String...[] args a legal one ?


this is not correct syntax. but String[]...args is a correct syntax for var-args of String arrays. but if you try to do this

public static void main(String[]...args) // will give Error. violates the signature of main method
 
Don't get me started about those stupid light bulbs.
 
subject: string array varargs