title: What is the difference between autowiring and object creation?
body: <p>What is the difference, if I autowire a class and provide value and instantiate an object of class and provide some value?
  For example-</p>
  
  <pre><code>@Autowired
  private UserService userService;
  userService.findUser(userName, password);
  </code></pre>
  
  <p>And</p>
  
  <pre><code>User user = new user();
  userService.findUser(user.getuserName(),user.getpassword());
  </code></pre>
  
  <p>What is the difference in Autowiring and sending the data and instantiating the object and sending the data to some service class?</p>
  
  <p>I'm trying to clarify the concepts in spring.</p>