A
Q. What is the result of the following code snippet?
abstract class MyAbstract {
private void myMethod() {
System.out.println("Private Method");
}
}
class MyClass extends MyAbstract {
public static void main(String[] args) {
MyClass obj = new MyClass();
obj.myMethod();
}
}
- Correct Answer - Option(C)
- Views: 7
- Filed under category Java
- Hashtags:
Discusssion
Login to discuss.