Win a copy of Head First Android this week in the Android forum!

Nicholas Barbosa

Ranch Hand
+ Follow
since Jun 04, 2020
I'm 16 years old and I got my first Java certification, now I'm Oracle Certified professional java se 11!!
Brazil
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
6
Received in last 30 days
0
Total given
19
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Nicholas Barbosa

Nani Ksowy wrote:Congrats! Did the exam include a lot of concurrency and modules questions?

Yes, I recommend studying these subjects.
7 months ago

Andre Garcia wrote:I'm still struggling to understand this concept (Automatic Modules can or cannot access Unamed?)..I have bought the perfect duo: Scott Selikoff and Jeanne Boyarsky's book and Enthuware mock tests..can someone point where I'm wrong, please? See


Automatic modules can access unnamed modules.

Augusto Moro wrote:Congratulations!! I'm preparing for the exam too. I have a question. Do you think the mock tests from enthuware more difficult than the real test?


Yes , they are!
I learned a lot from the mistakes I made in questions from enthuware mock exams.
7 months ago
Hi! I took 1Z0-819 and I passed with score 78%.
Just a few thing I want to say:

* it is the first certification of my life, which I got when I was 16 years old.
* I studied hard using OCP study guide programmer I and II.
* I used enthuware mock exams and I did all practice tests in OCP book.
* I used oracle docs.
* I wrote everything that I learned with enthuware, OCP books and oracle docs to improve understanding.

Campbell Ritchie wrote:Please don't quote the whole of the preceding post. Please tell us what the solution was.


Suppose thread1 acquire lock for alphonse and thread2 acquire lock for gaston. Thread1 and Thread2 execute line 30, on line 38 in bowBack() there is another lock so thread1 try to acquire this lock for gaston however gaston object is  already in a lock trying to acquire a lock for alphons object which is also already in a lock. So both are blocked forever one waiting for the other.

The second examples does not make sense, cause the lock will be granted to the object of the bow() argument and not the object which is calling the bow () method.
Hi,

I took an deadlock code example from Oracle docs. Follow

Now, follow the second example with the same part of the code but with some modifications

Why the second example not occurs a deadlock?

Paul Clapham wrote:Are you simply asserting that an exception will be thrown, or do you have some evidence for that statement?

(By the way: when you make a post, isn't there an "Attachments" tab at the bottom of the box where you type your post? Using that would be much preferred compared to making readers go to some other site.)



Yes!



If "target" not exists, an exception will be thrown. In case you haven't tested the photo code, here is a problem related to APPEND enum value in the stackoverflow.

Stackoverflow->https://stackoverflow.com/questions/30908816/java-nio-file-nosuchfileexception-why-nio-not-creating-file

Excerpt from the stackoverflow response that proves that the letter C is correct and not B, "You're using StandardOpenOption.APPEND, but that won't create a file; it will append to an existing file."
Hi,

Using APPEND, if the target file already exists, the contents of source file will be append to the end of target file and if the target not exists will be thrown an exception.

Making letter C and E correct.

Img -> https://ibb.co/N7T7Y04
Hi,

Using APPEND, if the target file already exists, the contents of source file will be append to the end of target file and if the target not exists will be thrown an exception.

Making letter C and E correct.

Img -> https://ibb.co/N7T7Y04
Hi,

Im studying for 1Z0-819 certificate and I saw that you must movel all projects from classpath to module path at once, please tell me if i got it right why.

The reason is, named modules cannot access unnamed modules.Using top down strategy, all projects that are not named modules(high-level) are automatic modules(low-level), cause named can access automatic modules. In this scenario, if the automatic modules(low-level) were unnamed, high-level modules that reference this low-level module, would have problems since the named module cannot access unnamed.

Working with bottom up, you dont need move everything at once, cause the projects that have been migrated are named modules(low-level) and the projects that have not been migrated are unnamed modules(high-level).In this scenario, high-level projects are unnamed modules and they can access your dependencies that are named modules already migrated.

Right?
11 months ago

Early Charlemagne wrote:Hi,

I have a query about Automatic modules.
On Chapter 6 in the Java OCP 11 Programmer II Study Guide by Scott Selikoff and Jeanne Boyarsky it's written "A key point to remember is that code on the classpath can access the module path. By contrast, code on the module path is unable to read from the classpath."
Also, looking at Table 6.3 (see attachment) I understand that Automatic modules cannot access unnamed modules on the classpath.

However, I read elsewhere the following:
Remember that modular code cannot access code present on the -classpath but "automatic modules" are an exception to this rule. When a non-modular jar is put on --module-path, it becomes an "automatic module" but it can still access all the modular as well as non-modular code. In other words, a class from an automatic module can access classes present on --module-path as well as on -classpath without having any "requires" clause

Did I misunderstand the information in Java OCP 11 Programmer II Study Guide?




Hi,

Unnamed modules are on the classpath. They can access JAR files on both the classpath and the module path.

Named modules are on the module path, they cant access any unnamed module.

Automatic module are on the module path, they can access all the modular as well as non-modular code.

For example, using Bottom-Up migration strategy, you have a mix of named and unnamed modules.The named modules are the low-level that have been migrated. They are on the module path and not allowed to access any unnamed modules, but the high-level that have not been migrated are unnamed and they access the low-level(named).

Another example, top-down migration, you move all projects to module path(now they are automatic modules), then you choose the first module that has more dependencies to add the module-info to convert the automatic module into a named module. If the modules that are low-level(have less dependence) were unnamed (that is, they were in the classpath) this strategy would not work, since named modules cannot access unnamed modules.Thats why you must move all projects to module path, using this strategy.
Hi Mihail,iWhen I did question 15, I thought it was an INOUT so the letter C was true for me.

Since the same param refers ta IN and OUT param,should be cs.setInt (1, 8);
double_number is an INOUT.



Should be since ?= is optional?

Im studying for the 1Z0-819 exam.

I know about wrapping process, high level stream take a low level instance in your constructor. I want to know if read(byte b), read(byte[]b) and read(byte[]b,int off,int len) have the same performance with buffered classes. Cause both read(byte[]b) and read(byte[]b,int off,int len) call repeatedly rea(byte b).

11 months ago