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

II-I cse-aids-aiml-cse(aiml)-cse(DS)_JAVA_QUESTION[1]

Cse Aiml

Uploaded by

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

II-I cse-aids-aiml-cse(aiml)-cse(DS)_JAVA_QUESTION[1]

Cse Aiml

Uploaded by

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

SHADAN

COLLEGEOFENGINEERING&TECHNOLOGY
(ANAUTONOMOUS INSTITUTION)
PEERANCHERU,HYDERABAD-500091

B.Tech.IYearISemester(R23Regulation)
QUESTION BANK [CSE,AIDS,AIML,CSE (AIML),CSE(DS)]
OBJECT ORIENTED PROGRAMMING THROUGH JAVA
SHORT ANSWER QUESTIONS.

UNIT I

1. Define encapsulation in Object-Oriented Programming?


2. State the primary purpose of inheritance?
3. What does JVM abbreviate?
4. Why is the super keyword used in Java?
5. Differentiate between print() and printin() methods is Java?

UNIT II
1. Differentiate between a base class and a sub class?
2. Define polymorphism in java?
3. Mention the importance of marking a method as final in Java?
4. Highlight the distinction between a class and an interface in Java?
5. List out benfits of stream oriented I/O?
UNIT III

1. List two types of exceptions in Java?

2. Describe what multithreading achieves in a program?

3. Describe the function of a daemon thread?

4. Define the role of the try keyword in Java?

5. Describe the main thread?


6. How to create a thread?
7. What is thread based preemptive multitasking?

UNIT IV

1. Explain the purpose of Adapter classes in Java?

2. State the function of the add () method in AWT components?

3. Explain what a Checkbox represents in Java?

4. What is Layout Manager in AWT?

5. What is an adapter class? Explain with an example.

UNIT V

1. Define an applet in Java?

2. Identify the Swing component used for displaying a text box for user input?

3. Name the method used to initialize an applet?

4. What is the purpose of the JButton class in Swing?

5. What is a swing?
LONG ANSWER QUESTIONS UNIT I

1) a) What is the role of constructors in Java? Explain the types of constructors with examples
b) Compare while and do-while loops in Java. Provide examples and discuss when to use each [5+5]
2) a) Write in detail about Classes, Objects and Methods
b)Briefly write about Inheritance, Overriding and Exceptions.
[5+5]
3) a) What is Object-Oriented Programming? Explain the principles of Object-Oriented Programming.

b)What is is the String class in Java? Explain any tive commonly used methods in the String class with examples
[5+5]
4) a) What is the role of constructors in Java? Explain the types of constructors with example.
b)Briefly write about Inheritance, Overriding and Exceptions. [5+5]

UNIT II

5) a) What are the types of inheritance in Java? Explain their benefits and costs with examples
a. What is polymorphism in Java? How does method overriding implement it? [5+5]

6) a) Define an Interface. Difference between classes and interface?


b) Explain about Variables in interface and Extending interfaces? [5+5]

7) a) Explain Abstract classes and methods in Java. Compare them with interfaces and provide an example.
a. Explain how Javi packages are created and accessed, and discuss their advantages with examples.
[5+5]
8) a) Define an Interface. Difference between classes and interface.
a. What is polymorphism in Java? How does method. overriding implement it? [5+5]

9. a) What are differences between an interface and class? Explain with suitable example.
b) Explain the concept of streams and about stream classes and classification? [5+5]

10. a) Explain character stream classes?


b) Explain the process of reading console input using byte streams? [5+5]
UNIT III
11. a) What is Exception Handling in Java and why is it useful and Explain with example?
b) Distinguish between Multithreading and Multitasking?

[5+5]

12. a) Summarize the Exception Hierarchy in Java and demonstrate how to create
Custom Exception subclasses?
b) Describe thread Synchronization, Thread Priorities, and Daemon threads in Java?

[5+5]

13. a) Write about Lifecycle of Thread?


b) Distinguish between Multithreading and Multitasking? [5+5]

14. a) Write a Java program that demonstrates how certain exception types are not allowed
to be thrown?
b) Compare and contrast process-based multitasking and thread based multitasking?

[5+5]
15. a) Explain in detail about usage of Try Catch and throws

(b)Write about Lifecycle of Thread? [5+5]

UNIT IV

16 a) What is Event Handling in Java? Explain sources, event classes, and listeners with
examples?
b) How do MouseListener und WindowListener handle events in Java? Provide examples?
[5+5]

17. a) Explain about AWT class Hierarchy?


b) Write about Layout manager and it types?
[5+5]
18. a) What is AWT in Java? Explain the components like Label. Button, TextArea, and
Panel with an example?
b) What is Event Handling in Java? Explain sources, event classes, and listeners with
examples.? [5+5]

19. a) How do MouseListener and WindowListener handle events in Java? Provide


examples?
b) Compare different layout managers in Java, Illustrate FlowLayout, CardLayout,
BorderLayout, GridLayout, FlowLayout, and GridBag Layout with examples?
[5+5]

20. a)What are the different types of events.Expalin in brief?


b)Explain adaptor classes with an examples? [5+5]

UNIT V

21.a) What are applets in Java? How do you create and pass parameters to them?
b) What are Swing components? Implement any three Swing components in Java?
[5+5]

22. a) Write a sample program using java applet?


b) Explain about Lifecycle of Applet and Types of Applets?
[5+5]

23.a) Explain the Distinguish between Applets and stand alone Applications in Applet life
cycle?
b) Demonstrate Swing components like JButton JCheckBox, JComboBox, JTree, and
JTable?
[5+5]
24. a) What are applets in Java? How do you create and pass parameters to them?
b) Explain the following
a) JScrollpane.
b) Combo boxes.

25. a) What is swing? Discuss its features. list out the limitations of AWT?
b) Discuss model view controller (MVC) architecture?

[5+5]

You might also like