File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

string array varargs

akila sekaran
Ranch Hand

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

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

gurpeet singh
Ranch Hand

Joined: Apr 04, 2012
Posts: 924

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
I agree. Here's the link:
subject: string array varargs
It's not a secret anymore!