Shouldn't in this question two options be selected?
Maybe I don't fully understand the question and the explanation, but after reading the explanation I would add to the answer also the third option (MyResource_fr_CA.properties adn MyResource_fr_CA.java will be the result).
About Question enthuware.ocpjp.v8.2.1201 :
Moderator: admin
-
- Posts: 27
- Joined: Tue Sep 22, 2015 1:01 pm
- Contact:
-
- Site Admin
- Posts: 10055
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v8.2.1201 :
MyResource_fr_CA.java is not a class file. It is a Java file.
HTH,
Paul.
HTH,
Paul.
If you like our products and services, please help us by posting your review here.
-
- Posts: 21
- Joined: Mon Oct 24, 2016 6:55 am
- Contact:
Re: About Question enthuware.ocpjp.v8.2.1201 :
In Boyarsky and Selikoff attention is to the .java and .properties files. So looks intricately
-
- Site Admin
- Posts: 10055
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v8.2.1201 :
I can't comment on what any book says but a .java file is not a valid resource bundle file. You can certainly create a resource bundle using java code in a .java file but in that case it will be compiled into a .class file and it is the .class file that is a valid resource bundle file. Not .java file. A java file will not be picked up by the JVM when you look for a resource bundle.
So you need to confirm with the book author about what they mean.
HTH,
Paul.
So you need to confirm with the book author about what they mean.
HTH,
Paul.
If you like our products and services, please help us by posting your review here.
-
- Posts: 31
- Joined: Sun Oct 13, 2013 1:20 pm
- Contact:
Re: About Question enthuware.ocpjp.v8.2.1201 :
Ìn the OCP Java SE 8 Programmer II Guide (Sierra/Bates), the same is presented, only talking about .properties and .java files being looked for. i never noticed, but I understand the JVM will be looking for .class files instead. Thanks to Enthuware!
-
- Posts: 3
- Joined: Tue Nov 05, 2019 6:22 pm
- Contact:
Re: About Question enthuware.ocpjp.v8.2.1201 :
I fully understand that the JVM reads from a .class file. I even stumbled upon this problem while I was doing exercises. I forgot to compile the resource bundle class
But still, as previously highlighted in this thread, 2 books (one from Oracle Press) are using the term .properties and .java files, so it builds patterns in the brain. It's an easy error to make on the exam, if the actual exam indeed disregards .java files from answers
Cheers.
But still, as previously highlighted in this thread, 2 books (one from Oracle Press) are using the term .properties and .java files, so it builds patterns in the brain. It's an easy error to make on the exam, if the actual exam indeed disregards .java files from answers
Cheers.
Who is online
Users browsing this forum: Bing [Bot], mcpunjabi and 49 guests