Saturday 19 March 2011

Can an Innerclass be instantiated in Spring?

Dont be surprise but the answer is yes..

package com.src;
public class MyClass{
public static class InnerClass{
}
}


In spring.xml it Innerclass can be instantiated as:

<bean id="myclass" class="com.src.MyClass$InnerClass" />



Wow !! this is good , spring is amazing.The innerclass should be public and static only.
But i am wondering ,will  there be any real significance left of InnerClass or not?

No comments:

Post a Comment