Posts

Write a Java program that correctly implements the producer – consumer problem using the concept of inter thread communication.

Write a Java program that implements a multi-thread application that has three threads. First thread generates a random integer every 1 second and if the value is even, the second thread computes the square of the number and prints. If the value is odd, the third thread will print the value of the cube of the number.

Write a Java program for the following: Create a doubly linked list of elements. Delete a given element from the above list. Display the contents of the list after deletion.

Write a Java program that works as a simple calculator. Use a grid layout to arrange buttons for the digits and for the +, -,*, % operations. Add a text field to display the result. Handle any possible exceptions like divided by zero.

Write a JAVA program using String Buffer to delete, remove character.

Write a JAVA program to sort for an element in a given list of elements using bubble sort.

Write a JAVA program to search for an element in a given list of elements using binary search mechanism.

Write a java program that display the roots of a quadratic equation ax2+bx=0. Calculate the discriminate D and basing on value of D, describe the nature of root.

Write a JAVA program to display default value of all primitive data type of JAVA.