• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Marcus Exam 3 #7

 
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This Question is from Exam #3
Which of the following statements are true?
1) An interface can only contain method and not variables
2) Interfaces cannot have constructors
3) A class may extend only one other class and implement only one interface
4) Interfaces are the Java approach to addressing its single inheritance model, but require implementing classes to create the functionality of the Interfaces.
it says answer is 4.
But what is wrong with 2. i think it should be part of answer because i tried following code
interface Test {
Test();
}
it gave me error "interface can't have constructors".
feel free to correct me and explain what is going on here?
vivek

[This message has been edited by Vivek Shrivastava (edited June 07, 2000).]
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Whats' the qstn# exam 3 ?
Regds.
- satya

[This message has been edited by satya5 (edited June 07, 2000).]
 
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Vivek,
Yes, 2 should also be true. Interfaces can't have constructors.

Satya,

It is question #7 in Exam3.
Suma.
 
Ranch Hand
Posts: 289
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Suma, you are quoting the question wrongly.Please find the original question below, verbatim.

Question 7)
Which of the following statements are true?
1) An interface can only contain method and not variables
2) Java does not allow the creation of a reference to an interface with the new keyword.
3) A class may extend only one other class and implement only one interface
4) Interfaces are the Java approach to addressing the single inheritance model, but require implementing classes to create the functionality of the Interfaces.

This is definately different from what you are presenting.Please try to give a question as it appears in your source, verbatim,
for people to give you accurate information.
Regards,
Herbert.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Herbert/Suma:
Suma is correct. I just checked the site and the qstn
#7 appears to have changed(but the ans hasn't ).
The copy I have is same as what Herbert has. However,
the website has the qstn orginally posted. Seems to be updated but the
date hasn't been changed.
We should keep in mind that exam3 is in half-baked state....
Marcus, knock knock .....
Regds.
- satya
 
arch rival
Posts: 2813
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Should be fully baked now!, It is now fully accurate and contains no errors whatsoever.
Marcus
 
Suma Narayan
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Herbert,
When I first saw the question, I thought the question is different from what I answered a few days back. I too have the same version as you have quoted. But then , I checked the site and saw the change in option #2.
Hi everyone,
Today, once again, I checked the answer and it says only 4. IMHO, It should include option #2 also.
Suma.
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I assume Marcus' "fully baked" comment had an invisible smiley . As of today the online version still says that "Interfaces cannot have constructors" is false, which is incorrect. So I'm moving this to Mock Exam Errata to draw Marcus' attention.
 
Marcus Green
arch rival
Posts: 2813
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ashly I was just trying to provoke someone to double check it and it certainly needed it. It really really should be fixed now, er I think.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
They exam has choosen options as 2,4.I checked today.
 
reply
    Bookmark Topic Watch Topic
  • New Topic