title: Spring Boot application terminated with exit code 1
body: <p>I'm new to Java and started a Spring application. However, when I instantiate a class in a different class and run a method the method does not output. </p>
  
  <p>The class where the method is being called is SpringIn5StepsApplication.java and it looks like:</p>
  
  <pre><code>package com.example.springin5steps;
  
  import org.springframework.boot.SpringApplication;
  import org.springframework.boot.autoconfigure.SpringBootApplication;
  
  @SpringBootApplication
  public class SpringIn5StepsApplication {
  
      public static void main(String[] args) {
  
          BinarySearchImpl binarySearch = new BinarySearchImpl();
          int result = binarySearch.binarySearch(new int[] {12, 4, 6}, 3);
  
          System.out.println(result);
  
          SpringApplication.run(SpringIn5StepsApplication.class, args);
      }
  }
  </code></pre>
  
  <p>The BinarySearchImpl class looks like:</p>
  
  <pre><code>package com.example.springin5steps;
  
  public class BinarySearchImpl {
      public static void main(String[] args) {
  
      }
      public int binarySearch(int[] numbers, int numberToSearchFor) {
          return 3;
      }
  }
  </code></pre>
  
  <p>As the binarySearch method is being called, the expected output is 3, but instead nothing is output when I run the program. What am I doing wrong and how can I get the 3 to output to IntelliJ?</p>