Detailed Java Assignment
Detailed Java Assignment
Index
No Topic Page
7 Bibliography 8
Java OOP Concepts and Applets - Assignment
Acknowledgement
I would like to express my heartfelt gratitude to my faculty and mentors for their valuable guidance
and support throughout this assignment. Their insights helped me understand complex Java
Abstraction means hiding implementation details and showing only essential features. It helps
Encapsulation is wrapping data and methods into a class and using access modifiers. It protects
class Person {
}
Java OOP Concepts and Applets - Assignment
Abstract classes can have method bodies and constructors. Interfaces only define method
signatures.
Example Interface:
interface Drawable {
void draw();
Use abstract classes when methods share code. Use interfaces for unrelated behaviors.
Java OOP Concepts and Applets - Assignment
class Demo {
void show(int a) {}
class A {
void display() {}
class B extends A {
try {
int a = 5 / 0;
} catch (ArithmeticException e) {
System.out.println(e);
} finally {
System.out.println("Cleanup");
}
Java OOP Concepts and Applets - Assignment
Use in code:
Modern Java no longer uses applets due to browser support removal and security issues.
Java OOP Concepts and Applets - Assignment
7. Bibliography