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
What are locale settings?
What is string example?
Can you explain the usages of class.forname()?
What is difference between printf and scanf?
What are the Class Libraries ?
Difference between current previous versions of Java?
What do you mean by thread safe?
Should database connections be singleton?
What are the practical benefits, if any, of importing a specific class rather than an entire package (e.g. Import java.net.* Versus import java.net.socket)?
What’s the difference between applets and standalone program?
Can we create a class inside a class in java?
Why does java not support pointers?
Why do people says “java is robust”?
What are different ways of object creation in java ?
Why method overriding is used?