Showing posts with label runnable interface. Show all posts
Showing posts with label runnable interface. Show all posts

Friday, 24 January 2014

CREATING A THREAD

CREATING AND STARTING THREADS IN JAVA

What are the two different methods of creating a thread in Java? What method must be implemented in either case?


In Java, an object of the Thread class can represent a thread. Thread can be implemented through any one of two ways:

                          1.You can implement the Runnable interface.
                          2.You can extend the Thread class itself.

Multi Threaded Programming in java

how to use multithreaded :runnable interface:...

Multithreaded Programming:


Unlike many other computer languages, Java provides built-in support formultithreaded programming. A multithreaded program contains two or more parts that can run concurrently.There are two distinct types of multitasking:process based and thred based.A process.in essence,a program that is executing.