• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

1Z0-829 exam experience, possible erratas in Sybex

 
Greenhorn
Posts: 2
2
  • 4
  • Number of slices to send:
    Optional 'thank-you' note:
Hello everyone!

I took my exam today, successfully with 72 %. First of all, I would like to thank Jeanne and Scott for great study guide - thank you. My experience with exam is same as already mentioned here - little time, lot of code to read and poor display resolution of testing tool - makes it hard to read. You can mark questions to review them at the end, but I didn't have time to do it. I was happy to answer all 50 questions, last three almost without reading. Also Enthuware tests are perfect, almost same questions like in the exam.

I have few questions/erratas about online test bank:
1. Flashcard questions

Which functional interface takes zero parameters and has a get() method?


And on the other side is Consumer. I think it should be Supplier.

Besides itself, which primitive types can be implicitly cast to int?


There is byte and short, what about char?

What are the names of the options available to set a classpath in a java or javac command?


There is -cp, --classpath, and -class-path, but should be --class-path and -classpath.

Also there was question about what commands takes module path and answer was like: "java, javac, jlink, jdeps takes -p or --module-path ..." - but jdeps takes only --module-path, -p means package according to study guide and --help command.

2. Practice exam 3

Which three functional interfaces can fill in the blanks to make the code compile? (Choose three.)




Options:
A. Consumer<Double>
B. DoubleConsumer
C. Function<Long, Double>
D. Function<String, Double>
E. LongToDoubleFunction
F. ToDoubleFunction<String>

Explanation:

Lines 6 and 7 both call the method applyAsDouble() rather than apply(). This tells us that the answer is a primitive functional interface, ruling out options C and D. The primitive versions are correct with options E and F. Line 8 calls accept(), making it a consumer. Option A is the remaining correct answer.



I was wondering why DoubleConsumer was not correct answer.

3. Book
Answers and explanations, chapter 14, typo in bold:
B, C, E.  Options B and C are properties of NIO.2 and are good reasons to use it over the java.io.File class. Option A is incorrect as both APIs can delete only empty directories, not a directory tree. Using a view to read multiple attributes leads to fewer round trips between the process and the file system and better performance, making option E correct. Views can be used to access file system–specific attributes that are not available in Files methods; therefore, option D is correct. Files is part of NIO.2, whereas File is part of java.io, which means option F is incorrect.

Review questions, chapter 7, question 28:

Finally, Eagle does not compile because it declares an abstract method soar() in a concrete class, making option D correct.


And also missing return type  

Thank you so much!

Good luck to others and have nice day.
 
Enthuware Software Support
Posts: 4828
52
  • Number of slices to send:
    Optional 'thank-you' note:
Congratulations!!
 
Marshal
Posts: 79392
377
  • Number of slices to send:
    Optional 'thank-you' note:

Radek Novotný wrote:. . .

Which functional interface takes zero parameters and has a get() method?


And on the other side is Consumer. I think it should be Supplier.

Did you quote that question exactly? It is not quite precise; functional interface don't have parameters. Their methods have parameters. I think you are correct about Supplier however.

. . .

Besides itself, which primitive types can be implicitly cast to int?


There is byte and short, what about char? . . .

Agree: see JLS (=Java® Language Specification). I haven't got the time to look at your other points, but shall award you a cow for the effor you put into that post.
And (again) congratulations
 
Bartender
Posts: 3915
43
  • Number of slices to send:
    Optional 'thank-you' note:
Congratulations !
 
Radek Novotný
Greenhorn
Posts: 2
2
  • 1
  • Number of slices to send:
    Optional 'thank-you' note:

Campbell Ritchie wrote:

Radek Novotný wrote:. . .

Which functional interface takes zero parameters and has a get() method?


And on the other side is Consumer. I think it should be Supplier.

Did you quote that question exactly? It is not quite precise; functional interface don't have parameters. Their methods have parameters. I think you are correct about Supplier however.

. . .

Besides itself, which primitive types can be implicitly cast to int?


There is byte and short, what about char? . . .

Agree: see JLS (=Java® Language Specification). I haven't got the time to look at your other points, but shall award you a cow for the effor you put into that post.
And (again) congratulations



Yes, it is copy & paste, question on flashcard fc864585.JaSE17SG.2.128 (I don't know if this is unique for my login).

Thanks for reply and cow

And thanks who congratulated me, it is my first certification and I am quite happy about it.
 
author & internet detective
Posts: 41905
909
  • Number of slices to send:
    Optional 'thank-you' note:
Replying in segments. This post is for the flashcards.

Radek Novotný wrote:

Which functional interface takes zero parameters and has a get() method?


And on the other side is Consumer. I think it should be Supplier.


Confirmed and added to the errata.

Radek Novotný wrote:

Besides itself, which primitive types can be implicitly cast to int?


There is byte and short, what about char?.


While char is correct, this isn't covered in the book and is out of scope of what you need ot know for the exam.

Radek Novotný wrote:

What are the names of the options available to set a classpath in a java or javac command?


There is -cp, --classpath, and -class-path, but should be --class-path and -classpath.


Confirmed and added to the errata.

Radek Novotný wrote:Also there was question about what commands takes module path and answer was like: "java, javac, jlink, jdeps takes -p or --module-path ..." - but jdeps takes only --module-path, -p means package according to study guide and --help command.


I can't find this flashcard.
 
Jeanne Boyarsky
author & internet detective
Posts: 41905
909
  • Number of slices to send:
    Optional 'thank-you' note:
This post is for the practice exam

Radek Novotný wrote:2. Practice exam 3

Which three functional interfaces can fill in the blanks to make the code compile? (Choose three.)




Options:
A. Consumer<Double>
B. DoubleConsumer
C. Function<Long, Double>
D. Function<String, Double>
E. LongToDoubleFunction
F. ToDoubleFunction<String>

Explanation:

Lines 6 and 7 both call the method applyAsDouble() rather than apply(). This tells us that the answer is a primitive functional interface, ruling out options C and D. The primitive versions are correct with options E and F. Line 8 calls accept(), making it a consumer. Option A is the remaining correct answer.



I was wondering why DoubleConsumer was not correct answer.


A and B are both correct answers. Added to errata.
 
Jeanne Boyarsky
author & internet detective
Posts: 41905
909
  • Number of slices to send:
    Optional 'thank-you' note:

And for the book

Radek Novotný wrote:
3. Book
Answers and explanations, chapter 14, typo in bold:
B, C, E.  Options B and C are properties of NIO.2 and are good reasons to use it over the java.io.File class. Option A is incorrect as both APIs can delete only empty directories, not a directory tree. Using a view to read multiple attributes leads to fewer round trips between the process and the file system and better performance, making option E correct. Views can be used to access file system–specific attributes that are not available in Files methods; therefore, option D is correct. Files is part of NIO.2, whereas File is part of java.io, which means option F is incorrect.


Confirmed and added to the errata.

Radek Novotný wrote:
Review questions, chapter 7, question 28:

Finally, Eagle does not compile because it declares an abstract method soar() in a concrete class, making option D correct.


And also missing return type  


While this is true, we didn't feel the need to mention everything wrong with it.

Have two cows for your great finds. Also, congrats on passing the cert!
 
Greenhorn
Posts: 4
  • Number of slices to send:
    Optional 'thank-you' note:
Hi All,
I bough a OCP 17 hard copy. would like to know where to find source code in GIT for the examples given in the book.
please share the link.
 
sj Jabbar
Greenhorn
Posts: 4
  • Number of slices to send:
    Optional 'thank-you' note:
Chapter 1
Page 20
Creating a Jar

I am able to compile and run my class Zoo.java
But not able to create a jar, below is an error

----------------------------------------------
D:\command-base>jar -cvf Zoo.jar
'c' flag requires manifest or input files to be specified!
Try `jar --help' for more information.
----------------------------------------------


After google found that need to add class .

D:\command-base>jar -cvf Zoo.jar Zoo.class
added manifest
adding: Zoo.class(in = 410) (out= 284)(deflated 30%)

Is my understanding is  correct to add class name with a command  ?



 
sj Jabbar
Greenhorn
Posts: 4
  • Number of slices to send:
    Optional 'thank-you' note:
Chapter 1
page 31

Can anyone explain why output is -56 for line 2.  What is the logic here. I tried other number and it is keep change when it is out of its range.

      1-Double apple= Double.valueOf("200.99");
       2-System.out.println("byteValue d="+apple.byteValue()); // -56
       3-System.out.println("intValue d="+apple.intValue());
       4-System.out.println("doubleValue d="+apple.doubleValue());


Output:
byteValue d=-56
intValue d=200
doubleValue d=200.99
 
Mikalai Zaikin
Bartender
Posts: 3915
43
  • Number of slices to send:
    Optional 'thank-you' note:
Perhaps, because upper range of byte primitive type is 127, so 200 cannot fit as positive.
Please check the explanation on the picture

byte.jpg
 
sj Jabbar
Greenhorn
Posts: 4
  • Number of slices to send:
    Optional 'thank-you' note:
Thanks for the response, But still not understand how -56  is the results.
200-56=144  // still not -56/correct
200-128=72 //  still no -56/correct

Would you elaborate picture please. What is the formula used here.
 
Paul Anilprem
Enthuware Software Support
Posts: 4828
52
  • 1
  • Number of slices to send:
    Optional 'thank-you' note:
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.
 
Paul Anilprem
Enthuware Software Support
Posts: 4828
52
  • 1
  • Number of slices to send:
    Optional 'thank-you' note:
BTW, the circular representation of the numbers is misleading because of the involvement of the 2's complement method.
 
Greenhorn
Posts: 25
3
  • 1
  • Number of slices to send:
    Optional 'thank-you' note:

sj Jabbar wrote:Thanks for the response, But still not understand how -56  is the results.
200-56=144  // still not -56/correct
200-128=72 //  still no -56/correct

Would you elaborate picture please. What is the formula used here.



The range of byte is between +127 and -128, so including 0 you have 256 possible numbers (200-256= -56, but that's not the way of calculating the casted result).
When you try to cast a number that is higher or lower than this range, it just "loops" over it.
Let's see what happens with positive numbers:
int i1 = 127 -> short 127
int i2 = 128 -> short -128
int i3 = 129->short -127
...
int i4 = 200-> short -56
int i5 = 256-> short 0
int i6 = 127+256-> short 127 (a whole loop is 256).
For negatives number is the same but the loops goes in the other direction.
This function tries to give a practical use of what Paul explained with his formula:
 
Jeanne Boyarsky
author & internet detective
Posts: 41905
909
  • Number of slices to send:
    Optional 'thank-you' note:

sj Jabbar wrote:Hi All,
I bough a OCP 17 hard copy. would like to know where to find source code in GIT for the examples given in the book.
please share the link.


The only code we make available is for the modules chapter (and the setup for JDBC). Both are linked from the book page.. Running the examples by copy/pasting won't prepare you for the exam.
 
Jeanne Boyarsky
author & internet detective
Posts: 41905
909
  • Number of slices to send:
    Optional 'thank-you' note:

sj Jabbar wrote:Is my understanding is  correct to add class name with a command  ?


You are correct. I've added this to the errata
 
MyExamCloud Software Support
Posts: 734
2
  • Number of slices to send:
    Optional 'thank-you' note:
Congratulations for your Java 17 Developer Certification !
 
Greenhorn
Posts: 12
2
  • 1
  • Number of slices to send:
    Optional 'thank-you' note:

Jeanne Boyarsky wrote:

sj Jabbar wrote:Is my understanding is  correct to add class name with a command  ?


You are correct. I've added this to the errata



What exactly is wrong in the book? I see a . (dot) in all jar commands on page 20 for the class names.
 
Jeanne Boyarsky
author & internet detective
Posts: 41905
909
  • Number of slices to send:
    Optional 'thank-you' note:

Manuel Trumm wrote:

Jeanne Boyarsky wrote:

sj Jabbar wrote:Is my understanding is  correct to add class name with a command  ?


You are correct. I've added this to the errata



What exactly is wrong in the book? I see a . (dot) in all jar commands on page 20 for the class names.


It's not a missing dot. It is a missing "class".
 
Jeanne Boyarsky
author & internet detective
Posts: 41905
909
  • Number of slices to send:
    Optional 'thank-you' note:

Jeanne Boyarsky wrote:

Manuel Trumm wrote:

Jeanne Boyarsky wrote:

sj Jabbar wrote:Is my understanding is  correct to add class name with a command  ?


You are correct. I've added this to the errata



What exactly is wrong in the book? I see a . (dot) in all jar commands on page 20 for the class names.


It's not a missing dot. It is a missing "class".


Oh! There's nothing in the surrounding text that talks about only including one class. So Manuel is right. There is no errata as the dot is in the book in both places it is mentioned on the page. Have a cow!
 
reply
    Bookmark Topic Watch Topic
  • New Topic
vceplus-200-125    | boson-200-125    | training-cissp    | actualtests-cissp    | techexams-cissp    | gratisexams-300-075    | pearsonitcertification-210-260    | examsboost-210-260    | examsforall-210-260    | dumps4free-210-260    | reddit-210-260    | cisexams-352-001    | itexamfox-352-001    | passguaranteed-352-001    | passeasily-352-001    | freeccnastudyguide-200-120    | gocertify-200-120    | passcerty-200-120    | certifyguide-70-980    | dumpscollection-70-980    | examcollection-70-534    | cbtnuggets-210-065    | examfiles-400-051    | passitdump-400-051    | pearsonitcertification-70-462    | anderseide-70-347    | thomas-70-533    | research-1V0-605    | topix-102-400    | certdepot-EX200    | pearsonit-640-916    | itproguru-70-533    | reddit-100-105    | channel9-70-346    | anderseide-70-346    | theiia-IIA-CIA-PART3    | certificationHP-hp0-s41    | pearsonitcertification-640-916    | anderMicrosoft-70-534    | cathMicrosoft-70-462    | examcollection-cca-500    | techexams-gcih    | mslearn-70-346    | measureup-70-486    | pass4sure-hp0-s41    | iiba-640-916    | itsecurity-sscp    | cbtnuggets-300-320    | blogged-70-486    | pass4sure-IIA-CIA-PART1    | cbtnuggets-100-101    | developerhandbook-70-486    | lpicisco-101    | mylearn-1V0-605    | tomsitpro-cism    | gnosis-101    | channel9Mic-70-534    | ipass-IIA-CIA-PART1    | forcerts-70-417    | tests-sy0-401    | ipasstheciaexam-IIA-CIA-PART3    | mostcisco-300-135    | buildazure-70-533    | cloudera-cca-500    | pdf4cert-2v0-621    | f5cisco-101    | gocertify-1z0-062    | quora-640-916    | micrcosoft-70-480    | brain2pass-70-417    | examcompass-sy0-401    | global-EX200    | iassc-ICGB    | vceplus-300-115    | quizlet-810-403    | cbtnuggets-70-697    | educationOracle-1Z0-434    | channel9-70-534    | officialcerts-400-051    | examsboost-IIA-CIA-PART1    | networktut-300-135    | teststarter-300-206    | pluralsight-70-486    | coding-70-486    | freeccna-100-101    | digitaltut-300-101    | iiba-CBAP    | virtuallymikebrown-640-916    | isaca-cism    | whizlabs-pmp    | techexams-70-980    | ciscopress-300-115    | techtarget-cism    | pearsonitcertification-300-070    | testking-2v0-621    | isacaNew-cism    | simplilearn-pmi-rmp    | simplilearn-pmp    | educationOracle-1z0-809    | education-1z0-809    | teachertube-1Z0-434    | villanovau-CBAP    | quora-300-206    | certifyguide-300-208    | cbtnuggets-100-105    | flydumps-70-417    | gratisexams-1V0-605    | ituonline-1z0-062    | techexams-cas-002    | simplilearn-70-534    | pluralsight-70-697    | theiia-IIA-CIA-PART1    | itexamtips-400-051    | pearsonitcertification-EX200    | pluralsight-70-480    | learn-hp0-s42    | giac-gpen    | mindhub-102-400    | coursesmsu-CBAP    | examsforall-2v0-621    | developerhandbook-70-487    | root-EX200    | coderanch-1z0-809    | getfreedumps-1z0-062    | comptia-cas-002    | quora-1z0-809    | boson-300-135    | killtest-2v0-621    | learncia-IIA-CIA-PART3    | computer-gcih    | universitycloudera-cca-500    | itexamrun-70-410    | certificationHPv2-hp0-s41    | certskills-100-105    | skipitnow-70-417    | gocertify-sy0-401    | prep4sure-70-417    | simplilearn-cisa    |
http://www.pmsas.pr.gov.br/wp-content/    | http://www.pmsas.pr.gov.br/wp-content/    |