Question: Which one of the following will declare an array and initialize it with five numbers?

Options

A : Array a = new Array(5);

B : int [] a = {23,22,21,20,19};

C : int a [] = new int[5];

D : int [5] array;

Click to view Correct Answer

Previous || Next

Language Fundamentals - General Questions more questions

Which one of these lists contains only Java programming language....

Which will legally declare, construct, and initialize an array?

Which is a reserved word in the Java programming language?

Which is a valid keyword in java?

Which three are legal array declarations?

Which three are valid declarations of a char?

Which is the valid declarations within an interface definition?

Which one is a valid declaration of a boolean?

Which three are valid declarations of a float?

Which is a valid declarations of a String?

Declarations and Access Control - General Questions more Online Exam Quiz

Declarations and Access Control - General Questions

Objects and Collections - General Questions

Threads - General Questions

Automobile Engineering - Part 1

Compressors, Gas Dynamics and Gas Turbines - Part 1

Engineering Materials - Part 1