Subject Code:23UCS04/23UCA04 Subject Code: 23UCS04/23UCA04
Pachamuthu College Of Arts And Science For Women Pachamuthu College Of Arts And Science For Women
Dharmapuri. Dharmapuri.
CIA EXAMINATION II--FEB 2025 CIA EXAMINATION II--FEB 2025
Class&Sem:II-[B.Sc (cs)&BCA] & IV Time :1 Hr Class&Sem:II-[B.Sc (cs)&BCA] & IV Time :1 Hr
Subject: JAVA Programming Marks : 25 Subject: JAVA Programming Marks : 25
Date :21/02/2025 Date : 21/02/2025
PART- A (5x1=5 Marks) PART- A (5x1=5 Marks)
Answer ALL Questions. Answer ALL Questions.
1.Which exception is thrown when a number is divided by zero? 1.Which exception is thrown when a number is divided by zero?
a)Nullpointer Exception b)IOException a)Nullpointer Exception b)IOException
c)Arithmetic Exception d)Number format Exception c)Arithmetic Exception d)Number format Exception
2.Which of the following exception is unlocked? 2.Which of the following exception is unlocked?
a) IOException b)SQL Exception a) IOException b)SQL Exception
c) Nullpointer Exception d) Class NotFound Excption c) Nullpointer Exception d) Class NotFound Excption
3.Which block is always executed in exception handling? 3.Which block is always executed in exception handling?
a)Try b)Catch c)Finally d)Throw a)Try b)Catch c)Finally d)Throw
4.Which interface must be implemented for creating a thread in java? 4.Which interface must be implemented for creating a thread in java?
a)Runnable b)Thread c)Callable d)Executer a)Runnable b)Thread c)Callable d)Executer
5.Which method starts a new thread execution? 5.Which method starts a new thread execution?
a) execute( ) b) start( ) c) run( ) d) init( ) a) execute( ) b) start( ) c) run( ) d) init( )
PART – B (2×5=10 Marks) PART – B (2×5=10 Marks)
Answer Any TWO questions out of three. Answer Any TWO questions out of three.
6.Explain the different ways to handle exceptions in java with examples. 6.Explain the different ways to handle exceptions in java with examples.
7.What is thread synchronizations?Explain the synchronized method with 7.What is thread synchronizations?Explain the synchronized method with
an example. an example.
8.Differentiate between byte stream and character stream in java. 8.Differentiate between byte stream and character stream in java.
PART – C (1×10=10Marks) PART – C (1×10=10Marks)
Answer either Aor B of the following questions Answer either Aor B of the following questions
9.a)Explain the concept of interfaces in java.How do you implement and 9.a)Explain the concept of interfaces in java.How do you implement and
extend interfaces?Give an example. (OR) extend interfaces?Give an example. (OR)
b)Describe multithreading in java.How does the thread class differ from b)Describe multithreading in java.How does the thread class differ from
the runnable interfaces?Provide examples. the runnable interfaces?Provide examples.
QPS HOD COE Principal QPS HOD COE Principal
Total Number of QP Require:42 Total Number of QP Require:42