[brailleblaster] Re: Java varargs

  • From: "qubit" <lauraeaves@xxxxxxxxx>
  • To: <brailleblaster@xxxxxxxxxxxxx>
  • Date: Wed, 15 Dec 2010 14:19:34 -0600

Hi Susan -- I am thrilled you are looking at this problem. Besides 
ProcessBuilder, Process and Runtime, what other classes are there in java6 
that would implement the methods correctly?
ProcessBuilder I believe was a public final class, so it can't be 
subclassed.
Thanks.
--le

----- Original Message ----- 
From: "Susan Jolly" <easjolly@xxxxxxxxxxxxx>
To: <brailleblaster@xxxxxxxxxxxxx>
Sent: Wednesday, December 15, 2010 1:35 PM
Subject: [brailleblaster] Java varargs


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




Other related posts: