// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.util.*;

public class VectorDiff {
   public static void main(String[] args) {
      Vector gamle = new Vector();
      gamle.add("a");
      gamle.add("b");
      String nye = "b,c";
      StringTokenizer st = new StringTokenizer(nye, ",");
      Vector nye2 = new Vector();
      while(st.hasMoreTokens()) {
         nye2.add(st.nextToken());
      }
      for(int i = 0; i < nye2.size(); i++) {
         if(!gamle.contains(nye2.get(i))) {
            System.out.println("INSERT " + nye2.get(i));
         }
      }
      for(int i = 0; i < gamle.size(); i++) {
         if(!nye2.contains(gamle.get(i))) {
            System.out.println("DELETE " + gamle.get(i));
         }
      }
   }
}
