A
Alan
I have a method (fragment below) that takes a File type "outFile"
as the output file. However, if the user of this method specifies
"null" for that parameter, I want to make the output go to standard
output instead of a file.
My question: To what do I set outFile (File type) to make the
output go to standard output (display)? System.out is of a type
PrintStream.
Thanks, Alan
public static void printData(File dir, File outFile)
{
try
{
if (outFile == null)
{
outFile = ?????; // Default is standard output (System.out)
}
.. . .
as the output file. However, if the user of this method specifies
"null" for that parameter, I want to make the output go to standard
output instead of a file.
My question: To what do I set outFile (File type) to make the
output go to standard output (display)? System.out is of a type
PrintStream.
Thanks, Alan
public static void printData(File dir, File outFile)
{
try
{
if (outFile == null)
{
outFile = ?????; // Default is standard output (System.out)
}
.. . .