Meaningless Drivel is fun!*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes mock01a Q36 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "mock01a Q36" Watch "mock01a Q36" New topic
Author

mock01a Q36

Dmitry Golynkin
Greenhorn

Joined: Aug 13, 2002
Posts: 23
code:

Explanation:
Line 2 is fine since array f1 contains elements of type G which is a subclass of F. The cast to G[]is needed, though, since the declared type of f1 is F[] and F is a superclass of G.
May be line 2 must be written one line below?
Can you explain me that line by line?
Thank you.
[ August 27, 2002: Message edited by: Dmitry Golynkin ]

good luck
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
Thank you,
I have corrected the mistakes and uploaded the new version


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: mock01a Q36