I am very new to Java and I am trying to reproduce the functionality of a c program. In the command line which starts the program there is an option to specify an output file. In c, I initialised a pointer to char as a Null pointer and then set this to point to the required output file if the option appeared on the command line.
If my understanding of Java is correct, this approach is impossible and the only option I can see is to initalise a boolean variable to false and then set it to true if an output file is specified.
Have I got this right? Thanks.
Thank you Henry for that clear answer. I will go away and think.
I have been programming for more than 40 years in a variety of languages but I find java extremely obscure, and the learning curve is very steep.