aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Queries Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Queries" Watch "Queries" New topic
Author

Queries

Smitha Ballikar
Ranch Hand

Joined: Aug 02, 2005
Posts: 99
Hi,

1. TreeMap stores what in sorted natural order? Keys or Values
2. Does Vector also store objects in FIFO order?
3.A higher priority thread will prevent lower priority thread to get access to cpu-Its given this statement is false..Why??

Thanks
Smitha
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

1 TreeMap is sorted by keys.
2. Think of Vector like an array or ArrayList, it adds to the bottom of the list
3. Thread priority is just a suggestion to the JVM, not a guarantee that one thread will take precedence over another. Think of it like a lottery. A high priority thread has 10 entries, and a low priority thread has 3 entries. What is the probability that the entry drawn is from the high or low priority thread. There is still a chance the low priority gets drawn.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Queries
 
Similar Threads
Regarding Garbage Collection!!
atomic operation and Priority
Thread Priority
Thread Priority
How can I control a CPU usages?