Hi, I got the idea I would extend the Socket class
and provide a few more useful methods to it for my
program...
I am having a problem though.
When I call the accept method of the ServerSocket class,
It returns a Socket object instead of the subclass object.
It compiles but this is causing a classcastexception when I try to run it in a test program. Can anyone tell me how I can assign the return value of the ServerSocket's accept method to my subclass of the Socket class? Is this possible.
Thanks
and provide a few more useful methods to it for my
program...
I am having a problem though.
When I call the accept method of the ServerSocket class,
It returns a Socket object instead of the subclass object.
It compiles but this is causing a classcastexception when I try to run it in a test program. Can anyone tell me how I can assign the return value of the ServerSocket's accept method to my subclass of the Socket class? Is this possible.
Thanks