Can you have a constructor in abstract class?
Answer Posted / abdul hannan
Yes. We can have constructor in an abstract class but we can
not directly instantiate it. If the abstract class have no
argument constructor, it will automatically call by the
constructor of subclass through constructor chaining. If
abstract class have constructor with argument, then we need
to call it by super() and pass the argument in it.
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
What is length in java?
What is the difference between array and array list in java?
What is a JAR file?
Is there any way to find whether software installed in the
system is registered by just providing the .exe file?
I have tried the following code but its just displaying the
directory structure in the registry.
Here the code :
package com.msi.intaller;
import java.util.Iterator;
import ca.beq.util.win32.registry.RegistryKey;
import ca.beq.util.win32.registry.RootKey;
public class RegistryFinder {
public static void main(String... args) throws Exception
{
RegistryKey.initialize(RegistryFinder.class.getResource("jRe
gistryKey.dll").getFile());
RegistryKey key = new RegistryKey(RootKey.HKLM,
"Software\\ODBC");
for (Iterator
How do you include a string in java?
What is the difference between yielding and sleeping?
what are the states associated in the thread? : Java thread
How does queue work in java?
Is string a datatype?
What is function and its uses?
Is string is a class in java?
What does file separator do in java?
What is the difference between the reader/writer class hierarchy and the inputstream/outputstream class hierarchy in java programming?
What is ide with example?
Why lambda expression is used in java?