Overriding only applies to methods, not instance variables. So if you declare a variable in a subclass that's got the same name as a variable in the superclass it's a separate variable. It "shadows" the original variable, which means that anywhere in your class B where you refer to a it means the a that's declared in B. But the other variable still exists, and any code in the A class will refer to that one.
If you're following good practices then this rarely causes any problems. If you make all your instance variables private then they aren't visible at all in the subclass.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com