This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes ARRAYS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "ARRAYS" Watch "ARRAYS" New topic
Author

ARRAYS

Abdul Latif
Ranch Hand

Joined: Jul 18, 2001
Posts: 89
Which of the following are legal array declarations. Select all correct answers.
a) int i[5][];
b) int i[][];
c) int []i[];
d) int i[5][5];
e) int[][] a;
The ans says its b,c,e but i am not able to understand why c?
Fei Ng
Ranch Hand

Joined: Aug 26, 2000
Posts: 1242
I think that just the way of the array syntax.
correct me if i am wrong.
Ragu Sivaraman
Ranch Hand

Joined: Jul 20, 2001
Posts: 464
Originally posted by Abdul Latif:
Which of the following are legal array declarations. Select all correct answers.
a) int i[5][];
b) int i[][];
c) int []i[];
d) int i[5][5];
e) int[][] a;
The ans says its b,c,e but i am not able to understand why c?

yep c is ok.. It just that the way it is....
Ragu
Mr Iftikhar
Ranch Hand

Joined: Oct 12, 2001
Posts: 39
Hi latif.
Yes latif int []a[] declaration of array is another style in JLS.


java language
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: ARRAYS
 
Similar Threads
strings
Majji exam
Question on array declaration:
confuse code
Problem in linking files