title: What will happen if bean having prototype scope included in bean having singleton scope
body: <p>I have a class having singleton scope (car) and it contain reference of another class(Steering) having prototype scope.Now whenever I am trying to print hashcode of class having singleton scope and class having prototype scope , value of hashcode is coming same.</p>
  
  <pre><code>Car car=(Car)ac.getBean("SingletonBean");
  Steering steering=car.getSteering();
  System.out.println("singleton obj &gt;"+car.hashCode());
  System.out.println("singleton obj &gt;"+steering.hashCode());
  Car car1=(Car)ac.getBean("SingletonBean");
  Steering steering1=car.getSteering();
  System.out.println("singleton obj &gt;"+car1.hashCode());
  System.out.println("singleton obj &gt;"+steering1.hashCode());
  </code></pre>
  
  <p>The hashcode of car is coming same because same object is being returned as its scope is singleton. That's why hashcode of steering is also coming same because same car object is being returned. But if Steering is in prototype scope , its hashcode should be different ??</p>
  
  <p>Thanks</p>