File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes ExamLab Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "ExamLab Question" Watch "ExamLab Question" New topic

ExamLab Question

Neil Muya
Ranch Hand

Joined: Oct 26, 2009
Posts: 30
Hi ,

I just encountered a declaration of an array in Exam Lab that looks like this:

well it's legal.

Just can't understand why?

Can anybody tell me the meaning of the declaration,

Because for what I see , it's reference is a one-dimension array and the declaration is two-dimensions.

Thank You!
gvarsh Varshney

Joined: Jul 28, 2009
Posts: 1
This is perfectly legal , if you look at this assgnment it is actually assigning the first element (which is a single dimentional array) of a annonymus two dimentional array to a one dimentional array reference it2.
hope it helps !

Neil Muya
Ranch Hand

Joined: Oct 26, 2009
Posts: 30
Ow okay got it. Thank You gvarsh! Mock Exams are really complexed. Hope I could overcome those questions on the day of my exam.

Thanks Again!
I agree. Here's the link:
subject: ExamLab Question
It's not a secret anymore!