aspose file tools*
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
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
 
wood burning stoves
 
subject: mock01a Q36
 
Similar Threads
need help with (object reference casting)
help .....casting
Package brain teaser
Valentin's Mock exam
OCP book (K & B) - Exam2 - Num 50 - GC question