Can you have a constructor in abstract class?
Answer Posted / saurabh
public class xyz : abc
{
int r = 10;
public xyz()
{
r = 35;
}
}
public abstract class abc
{
public int i = 0;
public abc()
{
i = 10;
}
}
sure , we can create constructor in abstract class.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Can a class declared as private be accessed outside it’s package?
What is the default execution method in java?
How do you create a null object?
Can we overload the methods by making them static?
Java Compiler is stored in JDK, JRE or JVM?
What is the java virtual machine?
How do you remove duplicates from an array in java?
What does string intern() method do?
What are the basic control structures?
What is string intern in java?
What are thread local variables?
Are true and false keywords?
Why set is used in java?
How do you do descending order in java?
How are variables stored?