title: How do I execute a method only after another finish?
body: <p>I have two method <code>saveLesson()</code> and <code>uploadFile()</code> which takes some time to finish.</p>
  
  <p>I'd like for the second method must start only after the first one finish.</p>
  
  <pre><code>saveLesson();
  if (!lessonDetails.get("file").matches(";No file attached")) {
      ArrayList&lt;String&gt; allFileUris = getFileNames(lessonDetails.get("file"));
      uploadFile(allFileUris);
  } 
  </code></pre>