|
Re: qustn on serilization
|
Posted: Sep 27, 2005 11:37 PM
|
|
I DID have some problems to understand your questions.
I'll try to do my best
difference between implements / extends.
You can't implement Thread
Basics: You IMPLEMENT interfaces, you EXTEND abstract or non abstract classes.
A Class can onlya have one super class. If you extend a non abstract class, you can simply add some of your own stuff. if you extend a abstract class you must create the abstract methods of the abstract class. This way the abstract class can use on some methods without actually have the code for them.
A class can implement multiple interfaces. Interfaces just ensure that the class offers certain methods. This way you can put access differerent classes through their iterface. You don't need to know wich class the objects have, you only need to know that they offer the method you want.
Inner classes. These classes make it much more easy to name the classes. This way you also can create a class wich should only be visible to one single class.
Vector and ArrayList I don't really get the difference, don't know why ArrayList isn't just an extension to Vector. An ArrayList can be converted easily into a Array. The method names of Vector seems a bit more intuitive.
|
|