Solved

Which of the following elements can an interface NOT contain?

Posted on 2007-03-31
6
2,172 Views
Last Modified: 2008-01-09
Which of the following elements can an interface NOT contain?
Constants, Constructors, Static Members or all of them?
0
Comment
Question by:mabtahi
  • 3
  • 2
6 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 18831039
None of the above is ruled out (from a perspective of valid and compilable C++ code), yet neither of them makes sense (except enum constants).
0
 
LVL 37

Accepted Solution

by:
gregoryyoung earned 125 total points
ID: 18831174
is this geared towards C# or C++?

The most interesting of these in C# is static methods which are actually supported bythe CLR but there is no language support for them. Beyond that possible exception allare not allowed.
0
 
LVL 15

Expert Comment

by:Thogek
ID: 18833480
Why does that sound like a test/homework question?
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 86

Expert Comment

by:jkr
ID: 18938851
Err: Why did you choose a comment as an answer that does not even refer to the question?
0
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 18941457
umm jkr, I certainly did .. I answerred it for C# it being that this is in the C# TA.

None are allowed in C# but the CLR supports static methods on interfaces.
0
 
LVL 86

Expert Comment

by:jkr
ID: 18949736
OK, don't know much about C#, so I misunderstood your comment, sorry. But in that case, we both are correct.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

A short article about a problem I had getting the GPS LocationListener working.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now