Question: Please solve 4 & 5 & 6 & 7 & 8. Thank youuu 4. Which of these best describes an array? a) A data structure
Please solve 4 & 5 & 6 & 7 & 8. Thank youuu 4. Which of these best describes an array? a) A data structure that shows a hierarchical behavior b) Container of objects of similar types c) Container of objects of mixed types d) All of the mentioned 5. How do you instantiate an array in Java? a) int arrl-new int(3); b) int arrll: c) int arrl-new int[3]: d) int arr0-new int(3) 6. What is the output of the following piece of code? public class array public static void main(String argsD) int [larr (1,2,3,4,5); System.out.println(arr[5]; a) 4 b) 5 c) ArrayIndexOutOfBoundsException d) Invalid Input Exception 7. A linear list of elements in which deletion can be done from one end (front) and insertion can take place only at the other end (rear) is known as a ? a) Queue b) Stack c) Tree d) Linked list 8. A queue is a ? a) FIFO (First In First Out) list b) LIFO (Last In First Out) list c) Ordered array d) Linear tree
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
