My Report

Java Array Test – 2


Correct Answer: 2 points | Wrong: -1 point
Grades: A* (100% score) | A (80%-99%) | B (60%-80%) | C (40%-60%) | D (0%-40%)
advertisement

1. Can you make an array volatile?

2. Where is an array stored in memory?

3. Which of these is an incorrect array declaration?

4. How to sort an array?

5. What will be the output of the following Java code?

int arr[] = new int [5];
System.out.print(arr);

6. What will be the output of the following Java code snippet?

Object[] names = new String[3];
names[0] = new Integer(0);

7. What is the type of variable 'b' and 'd' in the following Java snippet?

int a[], b;
int []c, d;

8. An array elements are always stored in ________ memory locations.

9. How to copy contents of array?

10. Generics does not work with?


 

Start practicing “1000 MCQs on Java”, and once you are ready, you can take tests on all topics by attempting our “Java Test Series”.

Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.