Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!

Scott Selikoff

author
+ Follow
since Oct 23, 2005
Scott likes ...
jQuery Eclipse IDE Java
Cows and Likes
Cows
Total received
29
In last 30 days
0
Total given
51
Likes
Total received
196
Received in last 30 days
0
Total given
237
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Scott Selikoff

Campbell Ritchie wrote:

Scott Selikoff wrote:. . . declared methods from java.lang.Object do not count toward the SAM (single abstract method) test for functional interfaces. . . .

That only applies to its nine public methods. If you try to overwrite the two protected methods, they count as additional abstract methods because they now have a different access modifier.



OOOhh, an exception to the rule within an exception to the rule, that's a good one!

Campbell Ritchie wrote:Whichever object you create implementing that interface, it will be created from a class and that class inherits the eleven non‑private methods of java.lang.Object.



Fun fact, if you try to overwrite methods in an interface that exist in java.lang.Object, they have to be compatible:



Another fun fact: declared methods from java.lang.Object do not count toward the SAM (single abstract method) test for functional interfaces.   For example, this is a valid functional interface even though it declares 2 abstract methods:

It’s available everywhere books are sold including Barnes and Nobles, Amazon, and Wiley Publishing.  Not sure about Safari online as that doesn’t cover the print edition.
First off, I appreciate your interested and feedback in this topic.  We always appreciate feedback in our books!

For the exam, you need to know that a for-each loop (also known as an enhanced for loop) iterates in sequential order.  For this reason, I is correct and II is incorrect, making A the correct answer.  The question doesn't state that there is a loop iteration variable (aka a counter) in a for-each loop.  It simply states that if you iterating over an array, then it starts with the value stored in index 0, so it is correct as is.

A good portion of both OCA8 and OCP8 exams is knowing the "plumbing" of Java.  For example, you need to know when/if the compiler will add default constructors to classes, or implicit modifiers to interface members.  Knowing this helps answer questions where invalid or incompatible calls/modifiers are present.
Hi Anas,

Jeanne and I are working on an 1Z0-816 book, it will be available early next year.  If you can wait, I'd recommend saving your money for the Java 11 exam.  If you are in a hurry, you can either take the 1Z0-809, or read a Java 8 book and try to fill in the gaps yourself.  If you do take the Java 8 cert, there is an upgrade cert for the Java 11 exam (1Z0-817) that you can take later on.

Whatever you choose, good luck in studying!
My best advice.. aside from studying and taking the cert... find a friend who can help get you a job as a developer, even if its just a side job.

Switching from testing to development, while possible, is not common in my experience.  For example, you might go in for a job interview for development but when they see you have testing experience they shift you to testing thinking you'd prefer to do what you know.  In order to get a development job, you have to play down your testing experience and play up your development experience.
8 months ago
True but what value is Object28274772918374 anyway?
8 months ago
Is it wrong that I wished toString() in Java outputted every object as json?  Aka... (if using Google's Gson).. new Gson.toJson(object)?  

Specifically the default implementation, not where they've been overwritten by a class.
8 months ago
Sorry, distribution is handled by the publisher, not us.  That said, I greatly prefer the physical copy as that is the one we had a hand in reviewing and typesetting.  I've heard from some readers that the Kindle version has some layout problems.  I'm not sure if that's because of particular devices, but the short version is we did not have any involving in laying out how it looks in the Kindle copy.

Jeanne Boyarsky wrote:

Javier Benjamin wrote:Not to justify myself but Oracle is not doing a good job being clear about releases (cadence, free or not and how/when ...).


I agree. I've given a talk at a number of user groups and conferences on the topic. I make a point of saying that I'm not affiliated with any of the vendors. I'm just trying to communicate the info



I think it took me 3-4 attempts to fully understand it.  While Oracle says "Java is still free", there's a long list of exceptions/conditions on that.  For example, if you don't mind updating versions of Java every 6 months in project, then yes, it's free.  If you want to stick with one version for awhile, you either need to pay Oracle, pay a third party vendor, or use the OpenJDK version.  It's not all bad, though, as different providers offer various performance improvements and tuning, more than you might get with the standard JDK.

I think my biggest problem is that it takes me 15-25 minutes to fully explain Java's support/license structure.  If you can't explain it in 30 seconds, then there's probably something nefarious going.... aka, I don't think it's a secret Oracle would love for everyone to purchase support licenses.
Collections are one of my favorite things in the Java API... whether they are in scope or not, learn them!  They help on a lot in practice.  I also recommend the Eclipse Collections framework, a lot of really cool stuff in there.