title: Type casting in spring program
body: <p>I am facing issue in spring program, the issue is Why type casting is applied in spring application?
  below is the program for reference.</p>
  <pre><code>public class Test {
    
  
      public static void main(String[] args) {
            
          ApplicationContext context = new ClassPathXmlApplicationContext(&quot;Beans.xml&quot;);
            Hello obj= (Hello)context.getBean(&quot;hello&quot;);
            obj.getMessge();
         }
      
      }
  </code></pre>