@Prem I am a little confused with the 2nd point. Why would you include a filter here? I think by listener you meant an Observer. Well having an observer is good to notify the cache. I would prefer you doing it in Java if you prefer going the scratch implementation. I would prefer you to take a look at memcached and its tweaks for LRU.
Devaka Cooray's Examlab is the best and the toughest mock exam there is for OCJP6. The masterexam which is supplied along with the book is a mock and not the real exam. The GUI of the real exam is outdated and we have to be very careful when we try to re evaluate our answers in case of drag and drop.
While casting, the compiler just checks the inheritance tree. If the cast is in the inheritance hierarchy of the reference variable, the compiler okay's it. This is the reason we use the "instanceof" operator before doing a cast.
The point is when is it resolved. The String literal is a compile time constant and is resolved by the compiler. Hence, there is one reference to the String constant pool. The new String("") is resolved at runtime and hence a heap object is created which would be referred to the String constant pool object.
Its not unsigned hexadecimal ID. Its the hashCode of the object. If there isn't a proper toString(), the Object's toString() prints out the hashCode of the created object.Also, if you want to test it out why not try to run it. Run using java -ea Clumsy.
Well Pritish, if it were the days of Sun then i would say i am late for the Developer exam. Now due some not so needed pre-requisites put by Oracle on the developer exam, it doesn't seem so right. But on a whole, it depends on making an application and that's what i love to do.
To make it clear, generics are just for implicit casting. They do not do anything else. Generics are just for type safety. Now in your case, you want a CategoryRecord so why not make a Vector<CategoryRecord>? Also, the vertor will always have the subclass of Record as Record is an interface but not allsubclasses of Record are not bound to have industryId.