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

java question bank module 5 & 6

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

java question bank module 5 & 6

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Question Bank 2023-24 GIFT (Autonomous) Bhubaneswar

OOPS using JAVA b-tech 3RD SEMESTER (module 3 and 4)

Questions Marks CO BTL


1 1 What is a package in Java? 2 3 1

2 What is the difference between import java.util.*; and import 2 3 1


java.util.Scanner;?
3 What is the difference between a process and a thread? 2 3 1

4 What is meant by the term "access control" in the context of packages? 2 3 1

5 Can a class belong to multiple packages in Java? 2 3 1

6 What is the default package in Java? 2 3 1

7 How does multithreading improve performance? 2 3 1

8 What is thread lifecycle? 2 3 1

9 Explain the difference between checked and unchecked exceptions in Java. 2 3 1

10 Can a finally block be skipped? If yes, when? 2 3 1

11 What is a custom exception? Provide a use case. 2 3 1

12 What is the purpose of the try-catch block in Java? 2 3 1

13 Can we access classes from other packages without importing them? 2 3 1

14 How does the try-with-resources statement work? 2 3 1

15 What is a subpackage in Java? 2 3 1

16 What is the difference between throw and throws in Java? 2 3 1

17 What is the NullPointerException in Java, and when does it occur? 2 3 1

18 What is the purpose of Frame class in AWT? 2 3 1

19 Can we catch Throwable in Java? 2 3 1

20 What is the difference between Panel and Frame in AWT? 2 3 1

21 What is the difference between Exception and Error in Java? 2 3 1

22 Why is the catch block used in Java? 2 3 1

Basic Electronics Engineering Page1


23 What is a Button in AWT? 2 3 1

24 How does an ActionListener interface work in AWT? 2 3 1

25 What is the Choice class in AWT? 2 3 1

26 Can you override static methods in Java? Why or why not? 2 3 1

27 What is the role of the paint() method in AWT? 2 3 1

28 What is the difference between TextField and TextArea in AWT? 2 3 1

29 What is the MouseListener interface in AWT? 2 3 1

30 What is BorderLayout in AWT? 2 3 1

31 What is the difference between extending the Thread class and implementing 2 4 1
the Runnable interface?

32 What is the start() method in Java threads? 2 4 1

33 How do you create a thread in Java? 2 4 1

34 What is the Thread.sleep() method used for? 2 4 1

35 What is thread synchronization in Java? 2 4 1

36 What is the join() method in Java threads? 2 4 1

37 What is a Deadlock in Java multithreading? 2 4 1

38 What is the difference between notify() and notifyAll() in Java? 2 4 1

39 What is the purpose of the wait() method in Java threads? 2 4 1

40 What is the Thread.currentThread() method used for? 2 4 1

41 What are the thread states in Java? 2 4 1

42 Can a class be defined inside a method in Java? 2 4 1

43 What is meant by a package hierarchy in Java? 2 4 1

44 What is the impact of importing the same class multiple times? 2 4 1

45 What is the java.io package used for? 2 4 1

46 What is the GridLayout manager in AWT? 2 4 1

47 What is the FlowLayout manager in AWT? 2 4 1

48 What is the KeyListener interface in AWT? 2 4 1

49 What is the List class in AWT? 2 4 1

50 What is the ArrayIndexOutOfBoundsException in Java? 2 4 1

Basic Electronics Engineering Page2


51 What is the StackOverflowError in Java? 2 3 1

52 Can we have multiple catch blocks for a single try block? 2 3 1

53 Can we handle multiple exceptions in a single catch block? 2 3 1

54 What is a thread pool in Java? 2 3 1

55 What is the Thread.interrupt() method in Java? 2 3 1

56 What is the difference between Frame and Dialog in AWT? 2 4 1

57 What is the package naming convention in Java? 2 3 1

58 What is the difference between sleep() and wait() in Java? 2 3 1

59 What is a thread in Java? 2 3 1

60 What is the visibility of classes in a user-defined package? 2 3 1

Section B BTL

1 What is the role of access modifiers (public, protected, private) in 6 3 2


packages? Explain with examples.

2 What is a package in Java? Explain its types with examples. 6 3 2

3 What is a sub-package in Java? Explain how you can create and use sub-packages. 6 3 2

4 What are the advantages of using packages in Java? Discuss with examples. 6 3 2

5 How can you access classes from a different package? Illustrate 6 3 2


with an example.
6 What is the default package in Java? Discuss its limitations and when it should be 6 3 2
avoided.

7 What is AWT in Java? Explain its key components and how they help in building 6 3 2
graphical user interfaces (GUIs).

8 Explain the role of containers in AWT. What are the different types of containers 6 3 2
in AWT?

9 Explain the concept of event handling in AWT with an example. 6 3 2

10 What is the role of Frame class in AWT? How is it different from other containers 6 3 2
like Panel?

11 How does AWT differ from Swing in Java? Discuss their key differences and 6 3 2
similarities.

12 What is the difference between checked and unchecked exceptions? Provide 6 3 2


examples of each.

13 Explain how you can use try-catch blocks to handle multiple 6 3 2


exceptions, and when should you use them over throws?
Basic Electronics Engineering Page3
14 What is the significance of Throwable class in Java exception hierarchy? 6 3 2

15 What is the difference between throw and throws in exception handling? Explain 6 3 2
with an example.

16 What are Error and Exception classes in Java? Discuss their differences. 6 3 2

17 Explain the finally block in exception handling. Is it guaranteed to execute? 6 3 2

18 What is exception handling in Java? Explain the various 6 3 2


components involved in exception handling.
19 What is multithreading in Java? Explain the difference between a process and a 6 3 2
thread.

20 Explain the life cycle of a thread in Java. 6 3 2

21 Explain how the wait(), notify(), and notifyAll() methods are used for 6 4 2
inter-thread communication.

22 What are the advantages and disadvantages of multithreading? 6 4 2

23 What are daemon threads in Java? How do they differ from 6 4 2


user threads?
24 What is a Deadlock in Java multithreading? How can it be avoided? 6 4 2

25 What is synchronization in multithreading? Why is it important? 6 4 2

26 What is AWT in Java? Discuss its importance in developing GUI applications. 6 4 2

27 Explain the different types of containers in AWT. How do they differ? 6 4 2

28 What is event handling in AWT? Explain how AWT handles user input events. 6 4 2

29 Explain the concept of AWT components. What are the main AWT components? 6 4 2

30 What is the difference between paint() and update() methods in 6 4 2


AWT?

Section C
1 What is the purpose of the import statement in Java? Explain with an 8 3 3
example how it is used to access classes from a package.
2 Explain the Thread class in Java. How can you create a thread 8 3 3
using this class?
3 What is exception handling in Java? Explain the key 8 3 3
components involved in exception handling.
4 Explain the concept of event handling in AWT. How are events handled in AWT? 8 3 3

5 What is the difference between checked and unchecked 8 3 3


exceptions in Java? Provide examples.
6 Explain the significance of the package-private access modifier 8 3 3

Basic Electronics Engineering Page4


in Java. How does it differ from other access modifiers?
7 What is multithreading in Java? Explain its advantages and disadvantages. 8 3 3

8 What is the difference between an interface and a class in a package? 8 4 3

9 What is thread synchronization in Java? Why is it important? 8 4

10 What are the rules for naming packages in Java? Provide guidelines and 8 4
examples.
Section D

1 Explain the architecture of AWT in Java with a detailed discussion on the role of 10 3 4
containers, components, layout managers, and event handling.
2 Explain the concept of packages in Java. Discuss the types of packages in Java, 10 3 4
how to create and use user-defined packages, and how packages help in
organizing Java classes. Provide examples of using built-in and user-defined
packages.
3 What is the role of the try-catch block in Java? Explain how multiple 10 3 4
exceptions can be handled using the try-catch block. Provide an example.
4 Explain the concept of multithreading in Java. Describe how threads are created, 10 4 4
managed, and synchronized in Java, and provide examples of creating threads
using the Thread class .Also, explain how synchronization helps avoid thread
interference and consistency problems.
5 What is the difference between System.exit() and return in 10 4 4
exception handling in Java?

** BTL: Bloom’s Taxonomy Level

** CO: Course Outcomes

BTL are:

1. Remembering
2. Understanding,
3. Applying,
4. Analysing,
5. Evaluating
6. Creating

Basic Electronics Engineering Page5

You might also like