0% found this document useful (0 votes)
4 views

Java Lab Internal Questions for Students

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Java Lab Internal Questions for Students

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

1.

Write a Java Program to display default value of all primitive data types of Java
2. Write a Java Program that display the roots of a quadratic equation ax2+bx+c=0. Calcu-
late the discriminate D and basing on the value of D, describe the nature of roots.
3. Five Bikers compete in a race such that they drive at a constant speed which may or may
not be the same as the other. To qualify the race, the speed of a racer must be more than
the average speed of all 5 racers. Take as input the speed of each racer and print back the
speed of qualifying racers.
4. Write a Java Program to search for an element in a given list of elements using binary
search mechanism.
5. Write a Java Program to sort given list of elements using Bubble sort.
6. Write a Java Program to perform multiplication of two matrices.
7. Write a Java Program that illustrates various methods of String class.
8. Write a Java Program that illustrates various methods of StringBuffer class.
9. Write a Java Program to implement a class mechanism. Create a class, methods and in-
voke them inside main method.
10. Write a Java Program to implement a constructor
11. Write a Java Program to implement constructor overloading.
12. Write a Java Program to implement method overloading.
13. Write a Java Program to implement Single Inheritance.
14. Write a Java Program to implement Multi level Inheritance.
15. Write a Java program that illustrates “super” keyword.
16. Write a Java program that implements an interface.
17. Write a Java program that describes Exception handling Mechanism.
18. Write a Java program that illustrates creation of User defined Exception.
19. Write a Java program that implements Run time polymorphism (Dynamic Method Dis-
patch).
20. Write a Java program that creates threads by extending Thread class. First thread display
“Good Morning” every 1 second, the second thread display “hello” every 2 seconds and
the third display “Welcome” every 3 seconds.
21. Write a JAVA program to paint like paint brush in applet
22. Write a JAVA program to create different shapes and fill colors using Applet.
23. Write a JAVA program to sort for an element in a given list of elements using merge sort.

You might also like