How to create a Simple Banner in Java

The thread that is ready to run, but waiting for the processor availability is called the runnable thread(runnable state).The runnable interface consists of a single method run() which is required for implementing thread.

Thread Priority in Java

The processor can execute only one thread at a time and the thread priority decides the thread is allowed to run. By using setPriority() we can set the priority of the thread of the various threads. Here priority means Order of execution.

Creating thread to print out messages

Multithreading means we can divide the program into two or more subprograms. All the subprograms can be implemented at the same time in parallel.We use run() for executing the sequence of code  that the thread will execute.

Daemon Thread in Java

 

There are two types of threads

  • User Threads
  • Daemon Threads

Usage of Thread in Applet

 

 The applet is used to display coloured bubbles of different sizes(all bubbles are of different size).
The choice or selection of the colour or size is done randomly. The array colors(colors[]) is used to store the different colours.
The Math.random() is used to randomly select the colour from the colors array and to calculate the size of the bubble.

 

Page 3 of 3

About Us

Rekha SetiaRekha Setia is a passionate blogger of Extra Computer Notes. if you have any ideas or any request me @