Question
int[] marks = {35,65,95};
System.out.print(marks.length + "," + marks[1]);
a.
2,65
b.
3,95
c.
3,65
d.
Compiler error
Posted under Java Programming
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. What is the output of the below Java program?
Similar Questions
Discover Related MCQs
Q. Which is the correct way of knowing Array Size in Java?
View solution
Q. We should not specify the array size if declaration and initialization are done at the same time. (TRUE / FALSE)
View solution
Q. If an index of an element is N, what is its actual position in the array?
View solution
Q. An array in Java can be declared only of some predefined types. (TRUE/FALSE)
View solution
Q. The name of an array variable or identifier can start with ___.
View solution
Q. Shorthand array initialization in Java needs the keyword "new" to allocate memory to the array and elements. State TRUE or FALSE.
View solution
Q. Lazy initialization of array requires the keyword "new" to allocate memory to the array and its elements. State TRUE or FALSE.
View solution
Q. What is the default value of an element of Object type array?
View solution
Q. What is the default value of byte, short, int or long data type elements of an array in Java?
View solution
Q. What is the default value of float or double data type elements of an array in Java?
View solution
Q. What is the default value of a char data type elements of an array in Java?
View solution
Q. What is the default value of boolean data type elements of an array in Java?
View solution
Q. Allocating memory with the keyword "new" causes the array elements to carry default values. State TRUE or FALSE.
View solution
Q. An array of arrays in Java is called ___ array.
View solution
Q. A multidimensional array contains elements of the same data-type in all rows and columns. State TRUE or FALSE.
View solution
Q. An array of dimension N contains __ number of subscripts or brackets?
View solution
Q. An array with two dimensions is called a two-dimensional array in Java. State TRUE or FALSE.
View solution
Q. Row number and Column number in a Multidimensional array start with ___.
View solution
Q. A 4-dimensional array is an array of ___ dimensional arrays.
View solution
Q. Choose the correct way of initializing a multidimensional array below.
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Java Programming? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!
Cyber Security
Understand the fundamentals of safeguarding digital assets with our Cyber Security...
Microprocessor
Understand the heart of your computer with our Microprocessor MCQs. Topics include...