Im also having a problem with when i create and put objects in the collection i use the key (above 502146) which is the registration of the object how can i set that to the registration within the collection? (when i print out the collection the registration is null).
You could use .keySet().toArray() and print out everything in the array it returns. You could also use .containsKey("registrationNumber") to see if the registration number is in the "Collection" (actually since you're using put to map key->value it is probably more specifically some kind of class that extends Map).
Also I have overided toString(), i have a bunch of types (eg. LargePlane, SmallPlane) that could be in this collection, how do i print like LargePlane? I've tried like typeOf() and stuff but it doesn't work, do i need to import something?
System.out.println(yourObject.toString()); I think you already know that, but I don't understand your question.