aspose file tools*
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
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ARRAYS
 
Similar Threads
Question on array declaration:
Majji exam
Problem in linking files
confuse code
strings