Hello.
If it is a gui program then you can use JFileChooser.
Create an object of JFileChooser. Then invoke showSaveDialog() on this object. Check the api doc for the method signature.
Let...