File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes MediaTracker and Socket Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "MediaTracker and Socket" Watch "MediaTracker and Socket" New topic

MediaTracker and Socket

Lee Feder

Joined: Aug 11, 2000
Posts: 20
Hi, I've been a voyeur of this site for a few months and found it invaluable during my studies for the SCJP exam.
I will be taking my test on 23rd August and I'm fairly confident of getting a good score. I am able to answer most of the questions posed on this BB and I get 100% on Roundup.
Judging from the feedback from people who have taken the exam, most of the questions only test the fundamental knowledge (not method signatures, etc.).
My question is regarding MediaTracker and Socket. Do I have to know any more than the following?:

  • MediaTracker tracks media objects (images, audio, etc.)
  • MediaTacker.waitForID() and waitForAll() cause blocking (i.e. if I'm asked whether it causes a thread to stop executing, I answer Yes).

    • A Socket is an endpoint for communication between two machines.
    • You communicate through a socket using InputStream & OutputStream.

    • Any help will be appreciated.
      My next task is to read the JLS & RHE (again). So much reading...
J. Macha

Joined: Sep 14, 2000
Posts: 12
the following is a question from the pgjc book
Under which circumstances will a thread stop?
a) the method waitforId() in class MediaTracker is called.
b) the run() method that the thread is executing ends.
c) the call to the start() method of the Thread object returns
d) the suspend() method is called on the Thread object.
e) wait() method is called on the Thread object.
the book has the answer as ONLY B.
but depending how you take the word "stop" you could make a good argument for A,D, and E also being correct.
Any sugestions on how this type question should be handled on the exam. Should we consider stop to mean moved into a dead state, or moved into a non-running state.
Ira Jain
Ranch Hand

Joined: Sep 06, 2000
Posts: 70
J.Macha ,in my opinion you should take stop to mean dead state .
I hope I am giving the right suggestion .Please confirm.
It is sorta covered in the JavaRanch Style Guide.
subject: MediaTracker and Socket
It's not a secret anymore!