This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doubt in kathy sierra question?

 
Hennry Smith
Greenhorn
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


What is true?
A. One of them will compile, only one will be true
B. Two of them will compile, only one will be true
C. Two of them will compile, two will be true
D. Three of them will compile, only one will be true
E. Three of them will compile, exactly two will be true
F. Three of them will compile, exactly three will be true

Actual answer:
Answer:
D is correct. Fragments F2, F3, and F5 will compile, and only F3 is true.

A, B, C, E, and F are incorrect. F1 is incorrect because you can’t compare a primitive to
an array. F4 is incorrect syntax to access an element of a two-dimensional array.

please explain each of this in detail....i am confused in array...
 
Mohamed Sanaulla
Saloon Keeper
Pie
Posts: 3159
33
Google App Engine Java Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would suggest you have a look at the Array Tutorials.

f2- Is an Array of Arrays of float values. So f2[0] would actually return an Array float values. f2[0][0] would actually return an float value.
f3- Its just an array of float values.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic