Rik Roos

Greenhorn
+ Follow
since Feb 06, 2012
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Rik Roos

If not already mentioned but on page 246 ( object equation by autoboxing):

Last bullet :

Short and Integer from -128 to 127



This should be:

Short and Integer and Long from -128 to 127
Just started with chapter 3 at 14:00.
Finished question 20 at 15:17, so that is a bit lesser then 4 minutes per question.

@Mr Bates:
Question 8 confused me:

If the rest of the code compiles, which line(s) of code, inserted independently at line 13,
compile? (Choose all that apply.)



But then there is an option H: There are other errors in the code.

I am not a native speaker but ain't here a contradiction?
Thanks, but no need for that until now. In most cases the review-explanations are sufficient.

Yes, the KB's practice exams book.

After this book I will practice the enthu-mocks. Hopefully these will be a peace of cake after the KB's black-belt questions.

I completed the 1st chapter (14 questions) with 4 wrong answers. Thats reasonable.
But the 2nd chapter was so much harder to finish in a reasonable time (this was also stated in the introduction).

It says when you have not passed the 2nd chapter, you are not ready for the other exam-chapters.
When I follow this advice I will probably never start with chapter 3.

I think this book contains a lot of black-belt questions and the advice given was not very reasonable.

Someone here who has already dealt with this book? And what was your experience ?
Oke, I get it

So, the toString() is called as of the charsequence constructor.
Thanks for this eye opener.

Regards
Rik
Hi,

I have a question about the following excerpt (book java 6 practice exams, chapter 2 question 6) :



The java api 6 however does not show any constructor accepting a StringBuffer as an argument.
I also doubt that the toString method is called implicitly by the javac-compiler to replace the StringBuffer instance with a String instance.

So what is happening here? Why does the code compile and run while the api does not publish any StringBuffer accepting constructor?

Thanks in advance.
Your second function constructs a new Scanner object. This seems not something you really want.
I think you are better off by passing the reference of the main-scanner object to the 2nd function.
12 years ago
@Stephan
Dank je wel !

@Viktor
Indeed, I think it all depends on what is desired. So it gives only extra potential.

greetz
Rik
12 years ago
@Jeff

Oke, implementing some interface, that is clear to me.

But writing a default-access class without implementing any interface and still using public members seems a bit silly to me. Do you agree on this?
Any extending subclass of this default-access class can choose to make the overridden methods public, so no reason to make the super-members also public.

12 years ago
Hi everyone,

I was thinking about the possibility of marking the class-members with the public-access modifier while the embedding class itself has default (package) access.
That makes no sense in my humble opinion. However, the javac-compiler eats it and exits silently.

Is there a reason why one can mark a member as public but the class is having default access?

Greetz
Rik
12 years ago