LearnFrenzy
Sign in Take a free test

Arrays in Java · Java Arrays MCQ · Question 18

int[] a, b versus int a[], b Answer, explanation & discussion

  • MCQ
  • Hard
  • 0 comments
  • Answer explained
  • Moderated community
Question 18 Back to Exercise

What are the types of b in int[] a, b; and in int a[], b;?

  • A int[] in both
  • B int[] in the first, int in the second Correct
  • C int in both
  • D int in the first, int[] in the second
Correct Answer: Option B

With the C-style declaration the brackets belong only to a.

Discussion & Comments 0

Share your method, a shortcut, or ask about a step you didn't follow.

No comments yet. Be the first to share your solution!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links