Which of the following statements is not true for interfaces

A) Interface definitions does not have implementation
B) Interfaces must be declared as public
C) Interfaces can be instantiated
D) Interface does not have constructors
Explanation: Interfaces can only be implemented by inheriting and they can not be instantiated

Showing Answers 1 - 48 of 48 Answers

Pan

  • Jan 31st, 2006
 

C is correect answer. Interface can never be instantiated they should always be inherited so that member function should have implementation.

sekhar

  • Feb 24th, 2006
 

3 is

  Was this answer useful?  Yes

sekhar

  • Feb 24th, 2006
 

3rd is the correct answer since interface has no implemtation they cannot be instiated

  Was this answer useful?  Yes

Naresh

  • Apr 1st, 2006
 

A and D is right Answer

  Was this answer useful?  Yes

Guest

  • Apr 20th, 2006
 

B and C are not true for Interfaces. Interfaces have abstract methods and members whose implementation is done in the derived class. By default all the methods in an Interface are public, so there is no need to explicitly use the public keyword with them. The complier will through a complie time error if we use.  

  Was this answer useful?  Yes

Prem Kumar Nanda

  • May 9th, 2006
 

Question: which of the following statements is not true for interfaces

C) Interfaces can be instantiated

  Was this answer useful?  Yes

lal

  • Jun 29th, 2006
 

Answers B & C

B. Interface members should be declared as public, not interfaces.

C. Interfaces can not be instantiated.

  Was this answer useful?  Yes

sairam

  • Jan 28th, 2007
 

the variables intiated in the interfaces are implicitly a final variables .so your answer is wrong.

  Was this answer useful?  Yes

Rajesh K

  • Feb 13th, 2007
 

A) Interface definitions does not have implementationB) Interfaces must be declared as publicD) Interface does not have constructorsThis are answer for the above questions

  Was this answer useful?  Yes

pankajbanga

  • Feb 26th, 2007
 

Interface definition does not have implementation, they contain only signatures of methods, delegates or events.

Interface members are implicitly public, explicit modifiers are not allowed.

Interface cannot be instantiated directly

Interface cannot contain constructors

Interface cannot contain fields

Interface can itself inherit from multiple interfaces

  Was this answer useful?  Yes

Sivavt

  • Apr 2nd, 2012
 

(C) & (D) are wrong. Interface can be a type reference but cannot be instantiated. Interface cannot have constructor.

  Was this answer useful?  Yes

Pradeepa

  • Aug 8th, 2012
 

A. Interface definition does not have implementation

  Was this answer useful?  Yes

sjaiswal

  • Sep 4th, 2012
 

Interface does not have constructors
Explanation: Interfaces can only be implemented by inheriting and they can not be instantiated.

  Was this answer useful?  Yes

TheDentist

  • Apr 23rd, 2013
 

C is the correct answer. Interfaces dont have constructors so they cant be instantiated.

http://msdn.microsoft.com/en-US/library/vstudio/ms173156.aspx

  Was this answer useful?  Yes

Saurabh

  • Dec 24th, 2014
 

Both B & C are wrong. Interfaces can be private and in that case public classes cannot inherit them. You can define it within a class. C is wrong as we cannot create an instance of the interface.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions