Re: Can we declare a variable as Object type?
Friday, September 22, 2006 02:32 AM
No you can't, and if you think about it, it does not make any sense at all. Try walking into a bakery, a butcher, or a clothing store, and ask for 100. They will not understand. Same goes for objects. If you setup a Socket variable, it needs a Socket (or one of its sub-class) to be assigned to it. 100 is not a Socket.