title: How do I run the main method in a different file in Java?
body: <pre><code>package jav;
  class PackageDemo
  {
      public void display()
      {
          System.out.println("PackageDemo executed");
      }
  }
  public class PackageDemoDriver
  {
      public static void main(String[] args) {
          PackageDemo boy = new PackageDemo();
          boy.display();
      }
  }
  </code></pre>
  
  <p>This is the code for a package.
  I will be importing this package into a different file.
  The code for that is:</p>
  
  <pre><code>package exercise;
  import jav.PackageDemoDriver;
  class Exe
  {
      public static void main(String[] args) {
  
  
  
      }
  }
  </code></pre>
  
  <p>What should I fill in the main method to run display(), if it is possible to do so?</p>