I have a variable declared as type Object a which actually refers an instance of type A.
Object a
A
In EL, I can directly use the following expression
It's because name is a property of the object a, and probably the object is also a JavaBean (not to be confused with Enterprise JavaBean).
name
a
See here for Expression Language Documentation and here for a short tutorial.