Answer Posted / saroj kumar biswal
no we can't have constructor in an interface, why bcz constructor is used to initialize the instance variable stored in an object. Constructor is called concurrently while creating object. We can't create object to interface & also we can't provide instance variable to interface. So we can't use constructor in an interface
| Is This Answer Correct ? | 30 Yes | 3 No |
Post New Answer View All Answers
What is meant by design patterns?
What is data member in java?
How are variables stored in memory?
Why do we need autoboxing in java?
What are the 7 types of characters?
How list contains works in java?
How to optimize the javac output?
What is extension method in java?
What is math exp in java?
Why pointers are not used in java?
How do you use find and replace?
Can a method inside a interface be declared as final?
Does list allow duplicates in java?
What is difference between ++ I and I ++ in java?
What are classloaders?