aspose file tools
The moose likes Mock Exam Errata and the fly likes Majji exam Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Mock Exam Errata
Reply Bookmark "Majji exam" Watch "Majji exam" New topic
Author

Majji exam

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Which of the following are valid array declarations/definitions?
1: int iArray1[10];
2: int iArray2[];
3: int iArray3[] = new int[10];
4: int iArray4[10] = new int[10];
5: int []iArray5 = new int[10];
6: int iArray6[] = new int[];
7: int iArray7[] = null;
A) 1.
B) 2.
C) 3.
D) 4.
E) 5.
F) 6.
G) 7.
The Ans given is b,c,e,g.But i choose b,c,g.e is invalid since
no dimension for array is specified which results in compiler error.
Thanks!
Dd R
Greenhorn

Joined: Jul 23, 2000
Posts: 2
Hi,
E is the fifth line and it has dimension on the right hand side and it is correct. so no wrong with the majji's answer.
thanks,
dd
Originally posted by avn:
Which of the following are valid array declarations/definitions?
1: int iArray1[10];
2: int iArray2[];
3: int iArray3[] = new int[10];
4: int iArray4[10] = new int[10];
5: int []iArray5 = new int[10];
6: int iArray6[] = new int[];
7: int iArray7[] = null;
A) 1.
B) 2.
C) 3.
D) 4.
E) 5.
F) 6.
G) 7.
The Ans given is b,c,e,g.But i choose b,c,g.e is invalid since
no dimension for array is specified which results in compiler error.
Thanks!

 
 
subject: Majji exam
 
Threads others viewed
Expalin the answer -- Arrays
== question
Finding the closet element to Zero in a Array
inner class visibility
Quiz
IntelliJ Java IDE