Writing class that is subclass of Vector, java -
Just hope I can find someone to tell me whether I'm doing this right or not, just like I Never written before. So I want to write a class by the name of the process class which is a subclass of the vector, as well as a constructor which defines the blank queue. Apart from this, objects of vector type will be "objects". So here it is ...
process value of the public class & lt; Vector & gt; {ProcessQueue () {}}
vector anywhere Change your code to: public class process question & lt; T & gt; Vector extension & lt; T & gt; {} Anyway, I do not recommend you by using vector . check . If you have to do this then IMO ArrayList will be better. public class process question & lt; T & gt; ArrayList extension & lt; T & gt; {} and use list in your code: list & lt; SomeClass & gt; LstQueue = new process value & lt; SomeClass & gt; (); People fighting for the people of Orissa ¶ÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌ, I think like Duffimo, you must not extend any of the Java collection classes. Note that there are many classes for catching almost any kind of general collection, and you have and that can help you in your real work.
The best solution will be directed by Duffimo, instead of expanding the structure to a Java archive:
public class process value & lt; T & gt; {Private list & lt; T & gt; Data = new arreelist & lt; T & gt; (); // the rest of the code ...} or the new implementation of an interface, such as Queue or list . Public category processing price & lt; T & gt; Applicable queue & lt; T & gt; {// Implementation of queue interface methods ...}
Comments
Post a Comment