BCA202 Java Reappear Answers
BCA202 Java Reappear Answers
Q4. Recursion
class Overload {
Q7. Inheritance
- Single: One class inherits one. Multiple: One inherits multiple (via interfaces).
Q8. Interfaces
import java.io.FileWriter;
import java.io.IOException;
try {
} catch(IOException e) { e.printStackTrace(); }
}
Section B: Long Answer (10 Marks)
Section C:
class B implements A {
Thread Synchronization
class Counter {
int count = 0;
Section D:
Q15. Inheritance & super
void sound() {
Final:
Section E:
import java.io.*;
in.close(); out.close();
}
}
t1.setPriority(Thread.MIN_PRIORITY);
t2.setPriority(Thread.MAX_PRIORITY);
t1.start(); t2.start();