title: Multiple Constructor injection using Java Annotations
body: <p>The SPRING doc says the following </p>
  
  <blockquote>
    <p>Spring Framework 4.3, an @Autowired annotation on such a constructor
    is no longer necessary if the target bean only defines one constructor
    to begin with. However, if several constructors are available, at
    least one must be annotated to teach the container which one to use.</p>
  </blockquote>
  
  <p>As i understand if there are multiple constructors and we have not annotated any of them then i will get an error . I ran the following code</p>
  
  <pre><code>@Component // this is bean id 
  public class TennisCoach implements Coach {
   private FortuneService fortuneservice;
  
  public TennisCoach(FortuneService thefortuneservice) {
   System.out.println(" inside 1 arg  constructter");
   fortuneservice = thefortuneservice;
   }
    public TennisCoach() {
   System.out.println(" inside  0 arg constructter");
  
   }
  </code></pre>
  
  <p>I call that using the below code</p>
  
  <pre><code>TennisCoach theCoach = myapp.getBean("tennisCoach", TennisCoach.class);
  </code></pre>
  
  <p>But i  didn't get the error .I got the O/P as</p>
  
  <blockquote>
    <p>inside  0 arg constructter</p>
  </blockquote>
  
  <p>Why?</p>