0% found this document useful (0 votes)
8 views2 pages

IA3_Question Bank-1

question bank

Uploaded by

vaishnavi.pran
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)
8 views2 pages

IA3_Question Bank-1

question bank

Uploaded by

vaishnavi.pran
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/ 2

Module 4

1. Write a program that contains one method that will throw an


IllegalAccessException and use proper exception handles so that the exception
should be printed.
2. Demonstrate the working of a nested try block with an example.
3. Demonstrate try and catch block with its syntax to handle exception
4. Identify and list the types of exception
5. Identify the differences between throw and throws keywords.
6. Build a program using try and finally in exception handling.
7. Explain checked and unchecked exceptions in exception handling
8. Develop a program to handle Arithmetic exception using try and catch
9. Identify the differences between throw and throws keywords.
10.Make use of examples to show how exceptions are being handled in Java. Also
list out various types of exceptions.
11.Demonstrate the exception handling mechanism in Java try catch block. Also
write code snippet for handling multiple try catch block in a program.
12.Demonstrate the usage of nested try statements in a programs.
13.Make use of throw and throws differentiate its usage with example.
14.Make use of Exception class, extend and create custom exception class and
throw custom exception using throw keyword. Print error message in the catch
block.

Module -5
1. Make use of multitasking concepts explain multithreading concepts in Java
with creating thread object and getting the current thread name.
2. Make use of multithreading, explain the method of creating subclass thread(child thread
class) and mention the major methods of Thread class and its usage.
3. Make use of Runnable interface create child thread class and create multiple
threads in main method.
4. Make use of Thread class, create child thread class and create multiple threads
in main method.
5. Make use of Synchronization concepts, explain how multiple thread executions
are synchronized in JAVA. Explain both synchronized block and synchronized
method.
6. Make use of multithreading concept write a program to create two thread
classes for carrying out two different tasks in run method(may be Factorial
calculation, and Fibonacci number generation with multiple threads).
7. Make use of multithreading, explain the method of creating subclass
thread(child thread class) and mention the major methods of Thread class and
its usage.
8. Discuss the concept of Monitor in Java multithreading.
9. Demonstrate role of synchronization using simple java program.
10.Demonstrate role of synchronization using Consumer and Producer problem.
11.Demonstrate inter-thread communication in Java with an example.
12.Build a Java program to create an enum called Daysofweek representing the
days of the week.
13.Build a Java program using isAlive() and join() methods.
14.Make use of enumeration concept, write a constructor and user defined
functions in enum class and print its value.
15.Make use of wrappers class concept explain different types of wrapper classes
in Java. Also explain Autoboxing and Unboxing concepts.
16. Demonstrate values() and valueOf() methods in Enumerations with suitable
examples.

Lab Programs NO 9,11,12

1. Develop a JAVA program to raise a custom exception (user defined exception)


for DivisionByZero using try, catch, throw and finally.

2. Write a program to illustrate creation of threads using runnable class. (start


method start each of the newly created thread. Inside the run method there is
sleep() for suspend the thread for 500 milliseconds).

3. Develop a program to create a class MyThread in this class a constructor, call


the base class constructor, using super and start the thread. The run method of the
class starts after this. It can be observed that both main thread and created child
thread are executed concurrently.

You might also like