Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > a question on an ap prep book

Reply
Thread Tools

a question on an ap prep book

 
 
Eileen
Guest
Posts: n/a
 
      09-07-2008
public class Tulip
{
private int numTulips;

public Tulip(int nt)
{
numTulips = nt;
}

public String toString()
{
return "numTulips: " + numTulips;
}
}

what is demonstrated by the Tulip class declaration?
a. implementing an abstract method
b. implementing an abstract interface
c. composition
d. overriding an inherited method
e. multiple inheritance


-------------------------------------------------------------
first, java doesnt have multiple inheritance so (e) cant be true, and
i dont think it inherites anything so to me (d) is false as well.
 
Reply With Quote
 
 
 
 
Stefan Ram
Guest
Posts: n/a
 
      09-07-2008
Eileen <> writes:
>first, java doesnt have multiple inheritance so (e) cant be true, and
>i dont think it inherites anything so to me (d) is false as well.


Java also does not have »abstract interfaces«.

 
Reply With Quote
 
 
 
 
Patricia Shanahan
Guest
Posts: n/a
 
      09-07-2008
Eileen wrote:
> public class Tulip
> {

....
> first, java doesnt have multiple inheritance so (e) cant be true, and
> i dont think it inherites anything so to me (d) is false as well.


Remember that "public class Tulip {" is equivalent to "public class
Tulip extends Object {".

Patricia
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How is the application scoped? Question from 70-547 exam prep. kit maciek kanski ASP .Net 2 01-04-2008 01:46 AM
Good prep book Wild Duck A+ Certification 3 08-06-2007 05:47 PM
Question about prep for 70-305 David C. Allen MCSD 12 10-27-2004 04:31 PM
Exam 70-220 prep (Question) jfigueredo MCSE 2 01-04-2004 07:51 PM
Suggestions for Best Security+ Prep Book 2003 Harvey Rothenberg Computer Security 2 08-15-2003 02:14 AM



Advertisments