title: What is the purpose of Process class in Java?
body: <pre><code>Runtime objRuntime = Runtime.getRuntime();
  String strBackupString = "mysqldump -u " + userName + " -p" + password + " " + dbName;
  Process objProcess = objRuntime.exec(strBackupString);
  </code></pre>
  
  <p>This is used for backup of database. But what exactly happens? Can anybody make me explain, what is the purpose of <code>Runtime</code> and <code>Process</code> class?</p>
  
  <p>Is this class used to act as if we are typing command from command prompt? Then what should i pass to <code>objRuntime.exec()</code> if i want to open notepad? And is the command executed as soon as we call exec method? If yes, then what purpose does <code>Process</code> serve here? I really can't understand these two classes. Please make me understand. Thanks in advance :)</p>