This question is from JQ+ Which of the following correctly declare a variable which can hold an array of 10 integers? Answers: 1. int iA 2. int iA 3. int iA 4. Object iA 5. Object iA JQ+ says the answer is 1 and 3 I though 2 was the correct answer, can someone please explain this to me. Thanks, -Matt
You have to watch the semantics on the test. I passed mine in December with an 86% and am sure that I didn't get my goal of above 90% because of questions like this. The key here is an array that "can" hold 10 not "must" hold 10. Of course in order for this to actually hold 10 ints you would have to follow up with:
Hope this helps.
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Hello, And just to point out the obvious... Option number 2 wouldn't even compile - no matter what you were to follow it up with. Good Luck, -Dirk Schreckmann [ March 04, 2002: Message edited by: Dirk Schreckmann ]