adplus-dvertising
frame-decoration

Question

Which of the following is used to declare,construct, and initlaize an array?

a.

int arr [] [] = {1, 2, 3, 4};

b.

int [] arr = (1, 2, 3);

c.

int [] arr = {};

d.

int arr [] = {1, 2, 3};

Posted under Java Programming

Answer: (d).int arr [] = {1, 2, 3};

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Which of the following is used to declare,construct, and initlaize an array?

Similar Questions

Discover Related MCQs

Q. We can calculate the length of an array using ________.

Q. Which of the following is advantage of java array?

Q. In java, array elements are stored in ________ memory locations.

Q. What does a Data Type in Java refers to?

Q. Choose the wrong statement about Java programming?

Q. Which data type among the following is an implementation of Objects or OOPs?

Q. What is a Primitive Data Type in Java?

Q. Which among the following is not a Data Type in Java?

Q. Which among the following is not a valid Data Type in Java?

Q. Which is the data type used mostly to handle streams and buffers in Java language?

Q. Which is the data type that is not recommended for numeric applications in Java?

Q. Choose the number range for byte data type in Java?

Q. What is the size of a SHORT integer in Java?

Q. What is the size of an INT integer in Java?

Q. What is the size of a LONG integer in Java?

Q. What is the size of a FLOAT floating point number in Java?

Q. What is the size of a DOUBLE floating point number in Java?

Q. What is the size of a CHAR data type constant in Java?

Q. What is the size of a boolean data type constant in Java?

Q. What is the IEEE standard adopted to represent Floating point numbers in Java?