Paul Anilprem

Enthuware Software Support
+ Follow
since Sep 23, 2000
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads

Recent posts by Paul Anilprem

Being old and deprecated doesn't have anything to do here. new Integer(100) is used in this question for two reasons:

1. The question is about passing references (instead of primitives). Using autoboxing takes the focus away from the fact that an object is being added to the stack. The usage of the new keyword makes that clear.

2. Wrapper classes are on OCA 8 exam. new Integer(100) is a valid way to create a valid wrapper class object. You need to learn it (among other things about wrapper classes) anyway.

Also, not all the questions on exam are about the right way to do things. The code that you will see on the exam is not necessarily the code that you will use in real life project. You will see questions with bad practices, bad indentation, and bad logic.

So yes, it is better to use just 100 instead of new Integer(100) in real life code, but that has no relevance in this question. The question is fine as it is.

Peter Potter wrote:How much does it take you to do a standard Enthuware OCA test ? Even though my results range between 90 and 100% it takes me about 4 hours to do the test . Can i assume the real exam is faster to do or is there something wrong with my brain speed ?

Assuming that these are your scores in first attempt on standard tests (i.e. you have not seen those questions before), you are doing great. But you need to improve your speed. You should be able to finish them in the given time.
Looks like this has been resolved after a month of back and forth. OD was the culprit. Their system showed that the refund was issued, which is why their CSRs were so uncooperative, but underneath, the payment never actually went out to PayPal. After calling their billing dept repeatedly, one guy finally figured out the problem and resolved it!
2 weeks ago
You might want to try OCP Java 8 1Z0-809 Mock Exam from Enthuware. It costs only 10 bucks and we provide full refund if you find ANY mistake in our material.

Campbell Ritchie wrote:

Paul Anilprem wrote:. . . applying an explicit case. . . .

I presume you meant “cast”. I see my spelling was just as bad.

[the javac tool] expects . . . that the programmer knows what they are doing . . .

I always find it amusing that the javac tool thinks the programmer knows what they are doing

Yes, cast. Sorry about that!

Peter Potter wrote:
what i thought was that line 4 will throw classcastexception because  classes are in the same inheritance tree and compiler is not that smart to define whether under the superclas's reference a is a subclass object ( there might be ) or superclass object and has to allow assigning a reference to b and at runtime it will become clear that under a was superclass object and it ill throw an exception .

Your understanding is correct except that the code must assure the compiler that the superclass reference will point to a subclass objective by applying an explicit case. As you correctly mentioned that a could point to a a subclass object or the superclass object at runtime and the compiler has no way of knowing. That is why it expects to programmer to assure it that the programmer knows what they are doing and is willing to take responsibility if anything wrong happens (i.e. if the superclass ref does not point to an object of subclass) at runtime. This assurance should be given in the form of a cast, which is missing here at line 4.
2 weeks ago

Mohanraj Ramalingam wrote:Hello All,
Quick question on the certification. Bought certificate voucher on March 15 and it says 6 months validity. But the email says my voucher expires on 30 September.

IS it going to e Sep 15th or Sep 30? My understanding is 30 September. Can someone tell me is my understanding is correct.

Who did you buy the voucher from? If Oracle, then you should contact them and confirm.
Even if they say 30th Sep, be on the safe side and use it by the 15th. No matter who screws up, it will be an uphill battle to get it fixed ( ).
Here is what happened with one of my friends. Let's call him A. He purchased an HP laptop as a gift during last Thanksgiving from Office Depot. The laptop was delivered at his home and he sent it as it was, unopened, to his cousin. Let's call him B. Last month (i.e. 8 months later), A and B met at a family function and it A learned that his cousin never used the laptop because the laptop was a very low end machine. Even though A had ordered a high end laptop (i7 + touch screen etc.), the actual machine that was delivered was i3 + HP screen without touch. B never told A about it out of politeness. B didn't know that A had actually wanted to gift him an excellent (and expensive) machine.

When A learned about it he was obviously very upset and he chased Office Depot about it. They didn't believe that a wrong machine was shipped. Office Depot's argument was that the machine was readied by HP and Office Depot merely ships it to the purchaser. HP support was looped in and, after a week of back and forth between OD, HP, and A, they determined that it was not the same machine that was advertised in the deal. OD agreed to take the laptop back on the condition that it was unused. A shipped the laptop back to OD in original packaging.

OD received the laptop and issued a refund to PayPal.

Sounds good, right? Well, A had made the payment using his wife's PayPal account. After two weeks when W did not receive the refund in her PayPal account, A contacted OD about it. OD confirmed that they had issued the refund but PayPal maintained that they received no refund.

Apparently, the refund issued by OD was under A's name while the original payment from PayPal was from W's account and PayPal's matching process is somehow not able to match the refund with the original payment.

Finally, as of now, the status is that OD says they issued the refund and PayPal says they did not receive the refund. A has lost the laptop as well as the refund. A has no idea what to do now because neither OD nor PayPal is willing to do anything about it. OD has stopped entertaining A's request for proof of refund and PayPal has stopped entertaining A's request to trace the payment without transaction details from OD.

It is unbelievable that such a mess can happen in this day and age, in the US. What legal recourse does A have to recover his money? Any suggestion?
4 weeks ago

Valentin Crettaz wrote:Very happy to be around for this week's book promo! Thanks Javaranch!

Go ahead and shoot all the questions you have! Yeeehaaa!!!

Congratulations on the book, Valentin! Interesting topic for the book.
Wish you all the best.
1 month ago

Jeanne Boyarsky wrote:I took (and passed) 1Z0-816 today. That's the first step in starting book 2!

I blogged a bit about it.

1 month ago

Brecht Geeraerts wrote:If the compiler doesn't allow the following:

Then I am wondering, in what type of scenario would one use List<? extends X>?

Also, is this what is meant by "the List becomes logically immutable"?

This short writeup answers your question:

Brecht Geeraerts wrote:Ah, okay. Thanks, Paul. I did not know that

Then you may want to know about Vaporware Not to say that this book is such because we know that it will be out soon for sure.

Brecht Geeraerts wrote:Is that book already available for purchase?

Not yet. shows Nov 26 as the release date. Publishing companies have a tendency to start advertising long before the book will actually be available.  They create pressure on the authors as well.