Hey, welcome to the ranch, psachin joshi!
If you start looking you'll see you do this kind of thing all the time. Say you write a method:
When somebody calls that method, you don't know what kind of List they will pass. It might be a familiar one from the
Java library, or some totally new List implementation they made up. That's the goodness of abstraction: you can ignore the parts you don't need to know about and focus on the parts you do need. For example, you know the List will give you an Iterator but you don't have to know how it works.