Java Lab Exp
Total hits
Exp 1A. Write a program that computes the sum of all its integer arguments.
Exp 1B. Write a program to input n integers and perform sorting between them.
Exp 2A. Write a Java program that uses both recursive and non-recursive functions to print the nth value of the Fibonacci sequence?
Exp 2B. Write a program to define a class student with name, registration number and marks for three subjects as instance variables and describe a constructor to initialize them. Also define a method display to print all the values.
Exp 3A. Write a program to print the element of an array that has occurred highest number of times
Exp 3B. Write a program that displays a menu with options 1. Add 2. Sub. Based on the options chosen...
Exp 4A. Write a Program to count tokens- number of words and characters in a string.
Exp 4B. Write and test overloaded methods to find sum of three integers, sum of three double values and sum of four integers.
Exp 5A. Write a program to create an abstract class named Shape that contains an empty method named number of Sides ( )...
Exp 5B. Write a program that imports the User-defined package P1 and access the member variables and methods of classes that contained in the package P1.
Exp 6. A University awards some grace marks to students who participate in the Inter University games. Therefore, total marks awarded = Exam_Marks Sports_Grace_Marks. If total marks scored are greater than maximum marks, then the final marks awarded will be equal to the maximum marks....
Main Class
Results Class
Sports Class
Exam Class
students Class
Exp 7A. Write a program to handle Arithmetic Exception, Array Out of Bounds Exception using try and multiple catch statements.
Exp 7B. Write a java program to throw a user defined exception called Negative, if the entered input is a negative number
Exp 8A. Write a Java program that creates three threads. First thread displays - Good Morning for every one second, the second thread displays - Hello for every two seconds and the third thread......
Exp 8B. Write a Java program that correctly implements producer consumer problem using the concept of inter-thread communication.
Exp 9A. Write a program create a class “Book” with name, id, author, publisher and quantity as instance variables and a constructor to initialize them. Create a HashSet object of type Book...