title: How to use relative paths in the given below code?
body: <p>Consider the code sample below. Migrator class takes two input files, processes it and writes the output to final.tbl.
  I want final.tbl to be created on the same path where the folder of input files is present.
  Also the execute method should take relative path of this generated final.tbl file. </p>
  
  <pre><code> public class Migrator{
        public void Migrate(String path1,String path2){
            PrintStream out = new PrintStream("final.tbl");//I need relative path as that of input folder path i.e path1,path2
             //.....
             //.....Processing 
        }
   }
  
   class MainProcess{
         public execute(String path){
            //here the execute method should the the relative path of above final.tbl file
         }
  
         public static void main(String args[]){
  
         }
   }
  </code></pre>