Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


1) There are 10 different threads in runnable state. Each
having priority 1 to 10. How does the CPU schedules or
executes these threads?

Answers were Sorted based on User's Feedback



1) There are 10 different threads in runnable state. Each having priority 1 to 10. How does the CP..

Answer / karthik

We are not sure about when a thread runs it depends upon the
thread scheduler which can able to run a thread at any time
so the priorities are not sure even if we use the
setpriority method for a thread : ref scjp book thread chapter

Is This Answer Correct ?    10 Yes 3 No

1) There are 10 different threads in runnable state. Each having priority 1 to 10. How does the CP..

Answer / shiv

At any given time the highest priority thread will always
be in a execution state. if there are more than one threads
with same priority then JVM decides which one should be
executed first. Thus if the priority is from 1..10 the they
will be scheduled for execution in a reverse manner.

Is This Answer Correct ?    10 Yes 4 No

Post New Answer

More Core Java Interview Questions

Can we rethrow the same exception from catch handler?

0 Answers  


Can we iterate through collection using for loop?

2 Answers   Rolta,


give me the answer of this code class A extnds String This code we can write r not in Java? Explain?

4 Answers  


How can constructor chaining be done using this keyword?

1 Answers  


How many digits can a float hold?

0 Answers  


What is java regex?

0 Answers  


What is the difference between a window and a frame in java programming?

0 Answers  


Which package has light weight components?

0 Answers  


What is set string?

0 Answers  


What is the purpose of a transient variable?

0 Answers  


Variable of the boolean type is automatically initialized as?

0 Answers  


7) Suppose there is Student class like class student { int age; string name; } We want to store these objects in a HashMap. Do we need to override any methods in Student class? If any which ones and why? what if i just override equals or just hashcode? what will be the results in both the cases?

4 Answers   CSC, Nagarro, RBS,


Categories