Couple of words about exam. To say the truth, I thought it would be a bit easier. Maybe because OCA was too easy.
I barely answered all the questions in time. Most of the questions was time consuming, given a big listing with scattered commented lines like // insert code here n1 and asking what two changes should be done to make code print some result or sometimes (rare) to make code compile (usually you should select from six answers randomly ordered for lines n1 and n2). It is not easy to answer without examine code in details, I was not on time in the middle of exam so I just start to hurry to catch up. Do not expect much questions like "select what is true about this statement" - I have only 4 or 5 such question from 85.
On exam there was at least six questions about DB and some of them using ResultSet.TYPE_SCROLL_INSENSITIVE and ResultSet.CONCUR_UPDATABLE with calling update methods. So I suppose it should be mentioned in exam prepare guide. Like one of the questions: was given the data table of the records and updating one of them in resultSet.next() loop than returning to updated record, asking if it would contain the same value or replaced one in the result set:
At the same time, they just give a record table and doesn't mention about whether this type of result set is supported and does the query return result in exactly that order as in table (no ORDER BY in query). I answered it will still contain old value (since it is INSENSITIVE), but from the other hand it is updated via result set itself, why not update it ) You don't actually know if you not try it.
Most of the questions was stream related, you should know mapping from one stream type to another (object to int, int to long etc), knowing the name of the corresponding functions (DoubleFunction, ToDoubleFunction etc.). Also there was questions that piss me off using function lambdas returning another function lambda or supplier lambda that is then used inside streams asking what should be done to make code run, something like change wrong generic in function from:
and then it is used in map like mapToInt(fn.apply(s)) or something like this, don't remember exactly...
Another example of head blowing was method references using couple of :: in one line. Not sure how this work, but I have one question having all answer options with such kind of variants (something like Car car = Doable::new::getCar or something like this). This was the only question I have no ideas about the right answer )))
BTW, no single question using parallel() in streams.
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database