Nitish Bangera

Ranch Hand
+ Follow
since Jul 15, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Nitish Bangera

Just as Henry mentioned, can you please mention the java command that you ran. Mostly, you are't passing the correct path of package "pA" in the classpath.
Welcome to JavaRanch Shivabasayya. Go for OCJP7 is what i will suggest.
@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.
12 years ago
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.
If you have any native code, please configure it and then try to deploy it again.
12 years ago
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.
Tough luck Anishashu but you have great spirit. Just go for it and be calm and relaxed this time. About the mocks, just go through Examlab and K&B's exam. Examlab is the toughest mock there is.
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.
@Kedar new Clumsy() would inturn generate a value. It has nothing to do whether the object created is lost or can be referred. Please try and let us know.
Well that's exactly my point about the array object being garbage collected. I guess i wasn't specific and clear about it.
12 years ago


What would happen to the original new int[0] when new int[] {1,2,3,4} is assigned to numbers? Out of scope is a different thing. Also, it would be a negligible thing in short programs.
12 years ago
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.
12 years ago

Campbell Ritchie wrote:You might find array initialisers usefulAs long as you declare the boolean called noResult appropriately, I think all that code will compile.



Don't you think using Collections would be better compared to making different array objects and then some of these object won't have a reference and would be garbage collected?
12 years ago
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.
12 years ago