Teo Rajkumar

Greenhorn
+ Follow
since Oct 21, 2015
Teo likes ...
Netbeans IDE PHP Ubuntu
South Africa
Cows and Likes
Cows
Total received
1
In last 30 days
0
Total given
0
Likes
Total received
4
Received in last 30 days
0
Total given
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Teo Rajkumar

Hi Robert,

The code snippet for question 3 in chapter 7 does not start at line 1, as there are no line numbers. Since it doesn't start at line 1, we can assume that the imports and Class definition are present and are correct, thus w4 won't cause a compile time error.
Hi Fabio,

Yes they are correct.
The code on page 206 creates 2 streams, random and fractions and outputs both of them. They are each created from 2 different methods of DoubleStream.
The first stream, random, is created by From the Javadoc, we see that the generate method takes a (DoubleSupplier s). That (DoubleSupplier s) is Math::random which returns a pseudorandom double greater than or equal to 0.0 and less than 1.0.
This produces the output at the bottom of page 206.
The fractions stream is output at the top of page 207.

Hope this clears it up.
Is it possible to improve performance of a finite stream by rearranging the order of intermediate operations ?
4 years ago
Under the Creating a CyclicBarrier heading the sentence

Imagine that there is a lion pen that needs to emptied, cleaned, and then filled back up with the lions.


Should be

Imagine that there is a lion pen that needs to be emptied, cleaned, and then filled back up with the lions.

I passed the 1Z0-808 Java SE 8 Programmer I with 72%.

I am pleased with the result under the circumstances.

The resources I used were :
1. OCA: Oracle Certified Associate Java SE 8 Programmer I Study Guide by Jeanne Boyarsky and Scott Selikoff
2. OCA/OCP Java SE 7 Programmer I & II Study Guide by Kathy Sierra and Bert Bates
3. Mock exams from Enthuware
4. This Forum of course

My rocky start:
After going through the material and creating plenty of sample code using a text editor and command line, I thought I had a good understanding of it all so I attempted the Enthuware mock exams.
I attempted each exam a day after each other, which I now know was a big mistake. (You should spend a week or two going over the material you got wrong)

Foundation Test : 55%
Test 1 : 52%
Test 2 : 62%
Test 3 : 52%

After Test 3 I knew I wasn't getting better , so I moved my exam but unfortunately since I purchased my exam voucher with the 20% discount I had to take it this year(2015) so the maximum period I could move my exam was till today, which gave me 3 weeks.

I went over all the material again and made notes that I went over very day.

The week prior to the exam I attempted the rest of the mock exams

Test 4 : 62%

I was feeling demoralized after this, but when I went over the answers I found that the ones I got wrong were due to computational errors.

Test 5 : 56%

I felt worse after this. I stuck to my routine to go over my notes daily and and review sections that we giving me a difficulty. At this point it was do or die for me.

Week of the exam
Test 6 : 77%
Success!

Last Day : 71%

If I could I would have given myself a little more time to study, but nevertheless I am glad I passed.

Next up for me is Java SE 8 Programmer II 1Z0-809 exam. I plan to give myself enough time and only book my exam after I am happy with my Enthuware results.



4 years ago
Focusing on statics, variable scope slipped my mind. Makes perfect sense now. Thanks guys
Hi,

I'm currently studying for my OCA se8 and having been creating lots of simple code examples. I have created this Statics class to play around with the concepts of statics but I encountered this issue.
I'm calling both int values using the class name. Statics.two does not compile but Statics.one does.
Is "static int var=value1" not equivalent to "static{ int var2=value2}" ? If so how do they differ?