Solved

Which of the following elements can an interface NOT contain?

Posted on 2007-03-31
6
2,261 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
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?
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

730 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