title: Multithreading: How can we do Time Slicing using Java?
body: <p>Is it possible to do Time Slicing using Java using In-bult java classes?</p>
  
  <p>When searched on internet i am getting following kind of definitions only:</p>
  
  <blockquote>
    <p>Time slicing is a term which is usually associated with the processor and operating system ...
        what it means is ... When you have many processes running by an operating system then each process has to get 
        a chance to run ..that is each of the process should get the processor for particular time.....so now if you have 
        3 processes running eg- p0,p1,p2 then now p0 can run for a time of 5 ms then comes turn for p1 then for p2.....
        thus you are giving some time called as timeslice to each of the process that has to run by the processor.....
        Thus there are different algorithms which exists for these processes(depeneds on the operating System) 
        to run on a processor.....</p>
  </blockquote>
  
  <p>I am getting this question in Java Interview questions. But not able to get any Java Code example related to same. </p>
  
  <p>Is Time Slicing merely concept of Operating System or is there any practical usage to show using Java Programming? Can someone please share example for same?</p>