Answer Posted / suresh
No a interface should not have constructor,
Because, interface will not extends with object class.
if any class extends with object class then atleast one
constructor should be there, if user fail to keep the
constructor the compiler will keep a default constructor
with first statement as super();.
| Is This Answer Correct ? | 6 Yes | 2 No |
Post New Answer View All Answers
What is a copy constructor in java?
What is static block?
how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? : Java thread
What is java oops?
What is the main use of java?
'A class is a template for an object' explain this statement.
Why is multiple inheritance not supported in java?
What is final keyword in java?
What is the finalize method do?
Why we used break and continue statement in java?
Write a java program to generate fibonacci series ?
In a program, initializing an array of 100 KB is throwing an out of memory exception while there is 100 MB of memory available. Why?
What are the data types supported by java?
What is slash r?
What is use of super keyword in java?