Win a copy of Spring Boot in Practice this week in the Spring forum!

Paul Anilprem

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

Recent posts by Paul Anilprem

This seems to be an implementation detail. You can check out this source code for File class. It might not be the latest but can still serve as a good pointer. The comment on the normalizePath method (which is invoked by the constructor), says, "// Remove duplicate and redundant separator characters."

A different JDK (or a different version) may do this differently and so this behavior is not guaranteed.
1. Since exam topics are the same, you can use the same resources to study for the exam. You may use updated mock exams (as and when they are released) for your final leg of preparation.

2. Yes, you can register for both the exams even if you have not passed the 1z0-808 exam. In fact you can even take the 1z0-809 exam before passing the 1z0-808 exam but they won't give you OCP certification until you pass the OCA as well.
There is no upgrade to OCP 17 exam. You will need to take the regular OCP Java 17 1Z0-829 exam. But if you have just passed the OCP 11 exam, you can probably chill for the next three years and go the the OCP 21 exam
Meanwhile, focusing on other certs such as Spring, AWS, or something else, depending on your interests, might be more beneficial to you.
Congratulations! and thanks for sharing your experience.
1. No, you can't have a restroom break.
2. No, you can't have a physical scratchpad. The exam application provides a virtual notepad on which you can type or draw using the mouse.

Here are some more details about the exam that you might find helpful.

Marco Olivi wrote:
- With the Bottom-up method, you need to be in control of all of the classes/packages/jar files, in order to pack all of them in named-modules. At the end of the process, every class in contained in a module-jar file, that is inside the module-path folder.


Correct. Just to clarify further, there is nothing like "a module-path folder". There are modules packaged in jars and those jars are specified on the module-path. (Just like you specify jars on the classpath in a regular old style java applications). You may also have exploded modules (i.e. the ones that are not packaged in jar files) and you may specify those folders (under which you have the files of the exploded modules) in the module-path as well.


- You use Top-down method when you are not in control of some classe/packages/jar files, so that you can't convert all of them to named-modules or you just can't move some of them from the class path. So you just convert the packages you own, using automatic-modules as bridges from name-module and the unnamed module. If at the end of the method there are still classes in the class-path, you need to have at least on automatic module to use them.


Correct.
Btw, a detailed explanation is also provided with this question. Not sure if you have already gone through it but it might be helpful to get the complete picture:


But before conversion we don't have modules but packages and classes, so how can we move theme?


Even though the intent of the statement is clear, ideally, the statement should say, "In bottom-up migration, all jars/libraries should be converted to modules and then those modules should be placed on the module-path."


Regarding your doubt about "top-down" method:


Anyway I can't get how this  method can compile: just taking some "random"  packages (the one I am "most interested in...without worrying about their dependencies"), and turning them into named-modules without specifying his dependencies (requires) will not allow them to get automatic module, as well as it won't be able (as a named-module) to access to classes and jars in the classpath if needed. So how it is supposed to work?


The "without worrying about their dependencies" here refers to the fact that you don't have to worry about converting every dependency into a module. As in, you don't have to touch them at all. You can leave them as they are. You need to convert only the part that you are interested in. You will still need to do whatever it takes to convert the part that you are interested in into a module, including specifying the "requires" clauses and putting the rest of the non-modular jars on module-path or classpath (as determined by the jar which you just converted to a module).

Will update the explanation to make it clearer.

thanks for your feedback!
Replied to your question about "top-up" here.

There is no "top-up" method. That's a typo. It should be "top-down".
Actually, if you are using a "cast" then the sizes are irrelevant. You can even cast a double into a byte.
BTW, the circular representation of the numbers is misleading because of the involvement of the 2's complement method.
Formula is this:
1. First check the bit pattern of the number: 200 is 0xC8. i.e. 11001000
2. Since the first bit is a 1, this will be interpreted as a negative number (because byte is signed).
3. The value that negative number will be produced using 2's complement method. (flip the bits and add 1). So, 00110111 + 1 =  00111000 = 32+16+8 = 56.
Since it is supposed to be a negative number, the final number is -56.