Christian Maier

Greenhorn
+ Follow
since Mar 10, 2016
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
1
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Christian Maier

I think it is completely OK to use an easy to use IDE right from the start, like Netbeans, where you can use all the stuff from Oracle.
IDEs offer you some automated code check, autocomplete, automatic indention and formatting, comfortable navigation between references etc. etc..
You can download and import example projects from Oracle and debug them.
So debugging is of utmost importance throughout your programmer life, in any language.
Knowing the sequence of evaluation (to understand constructors, inheritance, design patterns) and inspect any param value at any moment is the best way to understand, find errors and create new code (unless you are Chuck Norris, of course).
Second, use a javadoc plugin, where you can get information about the classes.
So you do not have to start a browser for some basics.
Besides you should dedicate one lesson for hello world on the command line to know the basic commands, the environment variables and how to use text editors.
When i want to learn a new framework i buy a book with good examples and run them in debug mode.
If the examples do not work, throw away the book and buy another one, because loss of time is more expensive than bad books.
6 years ago
Today i was lucky to pass the exam with 82%.
Together with the OCA exam it took me about 4 months of full-day training.
(Minus 2 weeks of holiday and several weekends of social activity and skiing...)
I have several years professional experience in java (and a lot more in other programming languages).

For the OCA i did prepare with the the Boyarsky/Selikoff book only and got 75%.
The questions in the test were a bit harder than the book, so i was quite nervous at the test.

For OCP i used the book and Enthuware tests, because i had fear of overlearning the book-tests, which was the case.
Nevertheless Enthuware seems to cover some topics, which were not on the actual exam.
So if you get a question in Enthuware, which is not covered in the book, you maybe don't have to learn this for the exam (without guarantee, of course).
After finishing all Enthware-Exams i decided to make the test.

The day before the Test i found out, that in the meantime i forgot a lot of pitfalls of the Selikoff book-tests so i was not sure if i was well prepared.
Fortunately (but without warranty) many of the OCP Test questions were easier than the book-tests, quite the contrary to my OCA experience.
The Enthuware-tests were a lot harder than the real exam.
I really loved the detailled explanations in the Enthuware Test Exams.
These were a great learning aid.

Other recources:
Eclipse (as i am used to work with a GUI with all its features. For learning purposes it maybe would have been better to use an editor, but i really could not resist it)
Javadoc (integrated in Eclipse).
Oracle tutorials on concurrency.
Book "Functional Programming in Java".

I hope the following information about the exam is not illegal in this forum:
As many other people said:
You have to do tons of Lambdas/Streams examples because more than half of the exam questions contain these new features.
You have to be quick in analyzing Lambdas/Streams.
There are some typical things on the exam, like in the book and Enthuware tests:
If you can spot these quickly, you can save a lot of time on the exam.

A stream is used a second time.
Wrong or missing catch clause.
Stream without terminal operation.
Stream with more than on terminal operation.
Wrong lambda types used in stream operations.
Casting errors in stream operations.
Wrong lambdas in other method invocations.

Final methods being tried to override.
Closed DB-Connection/Statement - statement is reused after this.
DB-connection is never closed.
"Forgotten" synchronized-blocks on methods.
missing comparable/comparator in sorted Collections.
There were a lot of questions about sorting!
"Forgotten" assignements in immutable types.
"Forgotten" serializable / comparable etc... interfaces.
Wrong written or "forgotten" equals / hashcode in combination with sorting in Streams / Collections.
Many wrong castings, especially in combination with generics, you have to really read the code carefully.
You have to remember all information regarding casting, autoboxing, polymorphism, overriding, hiding from the OCA exam!
The exam also tries to trick you in mixing old I/O with NIO, old Date with new java.time API, and resultset Date/Time methods.

Many thanks to Jeanne Boyarsky / Scott Selikoff for the books and the Enthuware-Team for the mock exams.

I wish all the readers good luck for the exam.....





7 years ago
Hello,

I am learning for the OCP exam at the moment.
I really appreciate your book. It is a great help.
I have some ideas for enhancement.
1.
In Chapter 4, page 172 you defined the possibility of using variables in lambdas:
static vars.
instance vars.
effectively final method params.
effectively final local vars.
If i am right, this information also applies to "Member Inner Classes" and "Anonymous Inner Classes".
If this is correct, please add this information to your book.

2.
Chapter 10 page 510:
Class SetupDerbyDatabase:
I had to add Seconds to the Timestamp values in the update statement.
This is also the format used when you google timestamp and derby:
https://db.apache.org/derby/docs/10.5/ref/rrefsqlj27620.html

Maybe you could add the following information:
If you want to run this code again, please add something like:
stmt.executeUpdate("DROP TABLE animal");
stmt.executeUpdate("DROP TABLE species");
Maybe some of the readers have no experience with JDBC or SQL and want to delete their changes.

3.
Maybe you could split chapter 4 and 7.
Adding two chapters Streams and Parallel Streams.
Each with questions at the end.
In my opinion these chapters are too long in comparison to the other chapters.
They also contain a lot of new material for experienced programmers without Java SE 8 knowledge.

Thanks.