0% found this document useful (0 votes)
3 views1 page

Assignment 2

The document outlines an assignment on Java programming, covering topics such as the differences between abstract classes and interfaces, thread lifecycle, the super keyword, exception handling, and the final keyword. It includes programming tasks like calculating areas of geometric shapes using interfaces and inheritance, as well as multithreading examples. Additionally, it asks for explanations of inheritance types and the Java AWT hierarchy.

Uploaded by

Aditya Khalkho
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

Assignment 2

The document outlines an assignment on Java programming, covering topics such as the differences between abstract classes and interfaces, thread lifecycle, the super keyword, exception handling, and the final keyword. It includes programming tasks like calculating areas of geometric shapes using interfaces and inheritance, as well as multithreading examples. Additionally, it asks for explanations of inheritance types and the Java AWT hierarchy.

Uploaded by

Aditya Khalkho
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Assignment 2- Java Programming

1. Differentiate between abstract class and interface.


2. Explain thread lifecycle in java.
3. What is a super keyword? Where we use super keyword and why. Explain with example
4. What is an Exception? Explain how we handle exception in java with example
OR Explain try-catch block in java with example.
5. Explain final keyword with example for variable, method and class
6. WAP to display the area of square and rectangle. Make use of interface Base to define the template of
methods to be there in the derived classes.

interface Base
{
void read(float x);
void calculate();
void display();
}

7. WAP to find the area of a Circle using single Inheritance such that the base class method must accept the
radius from the user and the derived class method must calculate and display the area.
8. List and explain the types of inheritance in java.
9. Explain Java AWT hierarchy.
10. Write a java program to print even and odd numbers using two child threads. (multithreading)

You might also like