Can we inherit a class with private constructor?
Answer / Arti Rajput
No, it is not possible to inherit a class with a private constructor. Private constructors limit the creation of objects outside of their defining class and cannot be accessed by subclasses.
| Is This Answer Correct ? | 0 Yes | 0 No |
abstract class Demo { public void show() { System.out.println("Hello I am In show method of Abstract class"); } } class Sample extends Demo { public void show() { super.show(); System.out.println("Hello I am In Sample "); } } public class Test { public static void main(String[] args) { //I WANT TO CALL THE METHOD OF BASE CLASS IT IS POSSIBLE OR NOT CAN WE USE SCOPE RESOLUTION OPERATOR TO CALL OR JAVA NOT SUPPORTED THAT :: OPERATORE } }
Write a function for palindrome and factorial and explain?
1 Answers Honeywell, Huawei, Zomato,
What is an infinite loop?
What is the protected method modifier?
How do u pass data from one jsp to another jsp?
where lives in jvm
How do you compare values in java?
What is a deadlock ?
What is advantage of java?
Name the types of mouse event listeners ?
Class c implements interface I containing method m1 and m2 declarations. Class c has provided implementation for method m2. Can I create an object of class c?
Difference between linkedlist and arraylist.