• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Queries

 
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
reply
    Bookmark Topic Watch Topic
  • New Topic