JAVA | 2022

Answer the following questions in comments So, that everybody can see the Answers!

Section A (5×2=10)

1. List the differences between method overriding and method overloading. Give syntax for both as an Example.

2. Explain the life cycle of multithreading.

3. Define Applet. Explain the life cycle of Applet with diagram.

4. Discuss how database connectivity through JDBC is achieved.

5. Describe Swings. Differentiate between Applets and AWT.

Section B (4 x 5=20)

6. Explain Exception. Write different types of exception. Write a code demonstrating Exception.

7. Explain IOStream. Categorize the various types of streams. Explain FileInputStream and FileOutputStream with syntax of constructor of these.

8. Describe JDBC. Explain the architecture of JDBC with diagram.

9. Explain through code how parameter passing embedded in HTML file is achieved in Applet.

Section C (3 x 10=30)

10. Discuss multiple inheritance and the implementation of it in Java. Design a program code in Java to create interface named test. In this interface the member function is square. Implement this interface in arithmetic class. Create one new class called ToTestInt in this class use the object of arithmetic.

11. Discuss how Thread synchronization is achieved. Create a multithreaded program by creating the threads as objects of the class MyClass, which is not a subclass of Thread. MyClass will implement the runnable interface and objects of MyClass will be executed as threads by passing them as arguments to the Thread constructor.

12. List the different Layout and Component Managers. Create an AWT GUI application (called AWTCounter) as shown in the Figure. Each time the “Count” button is clicked, the counter value shall increase by 1. The program has three components:

a) a java.awt.Label “Counter”;

b) a non-editable java.awt.TextField to display the counter value; and

c) a java.awt.Button “Count”.

The components are placed inside the top-level AWT container java.awt.Frame, arranged in FlowLayout.

* The material and content uploaded on this website are for general information and reference purposes only and don’t copy the answers of this website to any other domain without any permission or else copyright abuse will be in action.

Please do it by your own first!

DMCA.com Protection Status

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments



0
Would love your thoughts, please comment.x
()
x