Q: An Array in Java is a collection of elements of ___ data type.
Solution: no solution
Q: The Java Virtual Machine (JVM) implements arrays as ___ type.
Solution: That is the reason why Java Array has predefined methods.
Q: Unlike C-Arrays, the Java-Arrays have ___.
Solution: no solution
Q: An array declaration in Java without initialization ___ memory.
Solution: Only initialization causes memory to be allocated.
Q: In Java language, an array index starts with ___.
Solution: no solution
Q: Which are the special symbols used to declare an array in Java?
Solution: no solution
Q: Which are the special symbols used to initialize an array at the time of the declaration itself?
Solution: int[] nums = {1,3,6};
Q: It is possible to skip initializing some elements of the array during Shorthand Initialization. (TRUE / FALSE)
Solution: No, you can not skip any elements. All elements need to be initialized in one go or at the same time.
Q: In Java, an array can be declared without initialization without mentioning the size. (TRUE / FALSE)
Solution: It is a Lazy initialization of an array.
Q: What is the output of the below Java code snippet with arrays? static int[] nums; public static void main(String args[]) { System.out.println(nums.length); }
Solution: no solution
You Have Score    | /10 |