Andrew Shumway

Greenhorn
+ Follow
since Jan 05, 2006
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
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Andrew Shumway

wait and notify are both member functions of Object so while a Thread could be notified because it is an Object this isn't the normal way of doing things.

B.wait(2000 ) releases the lock on B, and puts the thread A into a wait state. When someone else calls B.notify one thread waiting on B (possibly Thread A) will wake up and try to get the lock on B etc. If B.notify is not called within two seconds, then B will throw an InterruptedException.

I belive the statements "object B is notified" means that B.notify() is called from some other thread.


Then, what version of List should be given to make it work. I tried, but I could not get anything to work.
[ January 30, 2006: Message edited by: Hamid Virani ][/qb]<hr></blockquote>

Using the Generics class above the following declarations work



Because Number both extends Number and is super of Number



Like the above I can see that the input list will work because Number extends Number. However I can't see List<? super Integer> qualifies when the process method will return List<? super Number> However, I don't get a compile error. I'm guessng that since all super classes of Number are also super classes of Integer it's ok.



This also works for the same reason as the first.


--andrew
[ February 02, 2006: Message edited by: Andrew Shumway ]

Originally posted by Satou kurinosuke:
Congratulations
I'm considering taking on the upgarde too sometimes.
Does the upgrade only contains 1.5 specific related stuff (like Generics, Enums, Autoboxing...), or does it also contain topics of 1.4 ?



If you look at the objectives for the normal 1.5 exam you'll see that there is a lot of carry over from 1.4. Threads, language fundamentals, Collections etc. Any and all fo this can be found in the 1.5 upgrade exam.

I found the best way to guage what will or won't be on the exam is to compare the full and upgrade objectives and line out the sections on the full exam that are not in the objectives for the upgrade exam. This gives a bit better indication of the subset you will be tested on.

Also note. My opinion is that the portion NOT on the upgrade exam is the easier part of the objectives. This means that the average difficulty of the questions on the upgrade is higher.

--cheers
18 years ago
I just took the upgrade exam

I used the new S&B SCJP book. It covers everything in the exam. Unfortunatly, it does not have any notation in the tests or chapters regarding what is included in the upgrade vs the full exam with the exception of the objectives.

I printed out objectives for both and then lined out the objectives not on the upgrade test. I kept this list with my book and was thereby able to skip one full chapter and a few sections of the book. However, it doesn't help you to know which test questions to skip because the objectives are only listed with the test answers.

The CD that comes with the book is a pile of junk. Lots of typos and at least one wrong answer.

The only reason I can think of to do the full exam rather than the partial is if you are really good at the things that are not on the partial exam. This would give you more easy questions.
I posted details in the Certification results Forum.


https://coderanch.com/t/140514/sr/certification/passed-SCJP-upgrade-exam

Thanks to everyone for all your help.
Just got back the 1.5 upgrade exam.

I studied intensly with the new S&B SCJP book. The test seemed
quite a bit easier than any of the sample tests.

46 questions total
4 questions on Generics
8 Drag and drop questions.

I was a bit disapointed with my score 82% as I had over 90% confidence
in all but three of my answers.

I never thought to figure out what happens when one static nested class extends another static nested class and overrides a method... However, as I've worked with this since the test I think I got thoes right.

Thanks to everyone for all your help.
18 years ago
You're right. The drag and drop questions in the book can have multiple correct answers. I dont' think that was intended and it worries me that the test will have simmilar oversites. Unfortunatly, we will never know since the test doesnt' tell us what we missed and what the "correct" answer is.

You'll find a couple other small typos in the book. Ch 6 question 8 answer C doesn't use the typical type face for 'Currency' (a class not mentioned in the chapter. Question 7 of the same chapter fails to note that a File can be created with new File(String parentDir, String fileName) as well as File(File parentDir, String fileName. I've got another posting out regarding Ch 7 question 16. The 'correct' answers show the same compile error as one of the incorrect answers...

All in all the book is fairly clean though. It's the exam on the CD that's loaded with typos, errors, bugs etc. Close to 10% of the questions have prolems. One even scores you wrong if you answer C, shows the mistake and explains that C is the correct answer. I think the only reason the CD is in there is to make it more difficult to return the book.

cheers
--andrew
I think you are right.

I've been trying to make it clear when I post
about Generics or Boxing etc.

Those of us who are studying for 1.5 have to have a really
good knowledge of the objectives and how they differ from 1.4.
After that we can avoid 1.4 stuff by topic. (bit shift etc.)

But if you're trying for 1.4 you don't know that a flow control posting
won't have the new looping, autoBoxing, covariant returns, Varargs or Generics. Learning these now will only side track you from your 1.4 focus.

Perhaps we need two forums?

--andrew
You'll get more help if you are clearer in your post subject and question.

Which exam are you asking about?
http://www.javaranch.com/certfaq.jsp

Look at the various exams on the Sun site. Decide which one you want to try for and THEN start looking for the best resources. 1.4 has a lot of online help. 5.0 only a little and so you'll likely have to have a book.

cheers
I believe it depends on the perspective.

If your a method being called then you get parameters. If you are invoking a method then you pass it arguments.

Looks like you are trying to read carefully. That's good. Do note, however, that the authors are often a bit fuzzy with some particular definitions. Sometimes this diversity is in an effort to help everyone understand and sometimes this is in an effort to avoid unnecessary detail.

Member functions are call instance methods, as member variables are called properties or instance fields depending on your background. They are just trying to get people from various perspectives on the same sheet of music.



--andrew
I posted this a couple of days ago but didn't get any responses. I've tried to make this explaination a bit clearer in case it was difficult to follow before.

Here is the question as presented in chapter 7 of the new SCJP book by Sierra and Bates



I have two problems with the answer. First, I don't understand why C is wrong. My take on <? super E> is that the returned List can by of any super type of E. Since E would be <Integer> then <Number> should work.

My second problem is that in an effort to play with these constructs I made a little program. I can't even get the "correct" versions to work.

Here is the code



Cases A and F give this compiler error


Type mismatch: cannot convert from List<capture-of ? super Integer> to List<Integer>



Case C gives this compiler error


Type mismatch: cannot convert from List<capture-of ? super Integer> to List<Number>



Case E gives this compiler error


Type mismatch: cannot convert from List<capture-of ? super Number> to List<Number>




So as near as I can tell, all of these fail for essentially the same reason but I don't know WHY?

Anyone kind enough to point out where I've run amuck will be most appreciated.

Thanks
Welcome

I suggest you look at the FAQ

http://www.javaranch.com/certfaq.jsp

As it will have a lot of this information in it. There are books, web sites, online mock tests etc.

The amount of time you'll need to study depends on how much you know now, how quickly you learn, how much time you can devote to study, what tools you have and how well you want to do on the test.

If you want to get over 90% you'll need to spend a lot of time going beyond the basics in the books, writing programs, testing syntax, etc.

I think a typical programmer who has a few real-world projects to his/her credit can pick up a good book, and in 15 to 30 hours of study be able to pass.

Wish you well
I got my cert three years ago and the program may have changed.

At that time I received a "LOGO license contract" form which was an application to apply for use of the Logo on personal items etc. The application indicates that information of how to get the "artwork" or a "password providig you with access to the artwork" will be made via the Internet. I another letter they indicate that this is the purpose of the Email address on the Logo use application.

Hope that helps
I think the replies above have covered your question except the one about daemon threads.

by default the Main method won't exit until all of the threads launched have completed. Ok, System.exit, power outage etc can cause exceptions to this rule.

If a thread is marked as a daemon thread then the Main method won't wait around just because the thread is still alive. In other words, if a thread is just a background thread that polls a service for updated info durring the life of a process it will likely be implemented with an infinite loop in the run method. If you don't mark it as a daemon thread then program will just stay running even after the end of the Main method is reached in the main thread.

--andrew