hi
Q1
could anyone let me know what difference would it make to the program in terms of memory and program speed if i use arraylist or hastable or vectors
Q2
which of this is better program practise
declare separate vectors or arraylist for different data
or use hashtable and convert to vector when u need to do calcuations.
example
have some thing like
public class customer {
public static Vector cusList = new Vector();
void add(){
cusList.add(this);
}
}
}
or if you have some thing like
public class CustomerList extends Hashtable{
public Vector sort(){
//returns the hastable as vector(sorted)
}
}
public class customer {
public static CustomerList cusList = new CustomerList ();
void add(){
cusList.put(this.id, this);
}
}
so if i use type 2 i could always retrive data as vector if i need to do calculation or any other function in progrome which should make it faster