Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Which of the following elements can an interface NOT contain?

Posted on 2007-03-31
6
Medium Priority
?
2,342 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 375 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

972 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