JAVA QUESTIONS
JAVA QUESTIONS
2) A) Write a java program that display the roots of a quadratic equation ax2+bx=0. Calculatethe
discriminate D and basing on value of D, describe the nature of root.
B) Write a JAVA program to sort for an element in a given list of elements using bubble sort.
C) Write a java program for abstract class to find areas of different shapes.
3) A) Write a JAVA program to search for an element in a given list of elements using binarysearch
mechanism.
B) Write a JAVA program implement method overloading.
C) Write a JAVA program to implement Single Inheritance
5) A) Write a JAVA program to implement Interface. What kind of Inheritance can be achieved?
B) Write a JAVA program to implement constructor.
C) Write a JAVA program give example for “super” keyword.
7) A) Write a JAVA program that creates threads by extending Thread class .First thread display“Good
Morning “every 1 sec, the second thread displays “Hello “every 2 seconds and the third display
“Welcome” every 3 seconds ,(Repeat the same by implementing Runnable)
B) Write a JAVA program to display default value of all primitive data type of JAVA
C) Write a JAVA program Illustrating Multiple catch clauses
9) A) Write a java program that display the roots of a quadratic equation ax2+bx=0. Calculatethe
discriminate D and basing on value of D, describe the nature of root.
B) Write a JAVA program to implement constructor overloading.
C) Write a JAVA program to implement Interface. What kind of Inheritance can be achieved?