[brailleblaster] Re: Java varargs

  • From: "John J. Boyer" <johnjboyer@xxxxxxxxxxxxx>
  • To: brailleblaster@xxxxxxxxxxxxx
  • Date: Wed, 15 Dec 2010 13:43:50 -0600

I thought the exec method in Runtime would call an external command-line 
process. It spawns a separate thread for the process.

John

On Wed, Dec 15, 2010 at 12:35:28PM -0700, Susan Jolly wrote:
> After staring at the ProcessBuilder javadoc for a while, I realized there 
> was something I didn't recognize which turns out to be a vararg, introduced 
> in Java 5. Only the final (or single parameter) of a method may be a 
> vararg. The snytax is the type followed by three periods followed by the 
> name, e.g. String ... command.   A vararg may be passed either as an array 
> or as a sequence of arguments.  So ProcessBuilder can accept a String array 
> as an argument.  (Although, per my previous post, direct use of 
> ProcessBuilder may not be want we want to do.)
> 
> SusanJ
> 
> 
> 

-- 
My websites:
GodTouches Digital Ministry, Inc. http://www.godtouches.org
Abilitiessoft, Inc. http://www.abilitiessoft.com
Location: Madison, WI, USA


Other related posts: