Programming MCQS - QUESTION DETAILS

Which of the following is a correct way to create an ArrayList in Java?
A. ArrayList arr = new ArrayList();
B. List arr = new List();
C. List arr = new ArrayList();
D. ArrayList arr = new List();

'ArrayList arr = new ArrayList();' creates an ArrayList in Java.

Similar Questions

What is the output of printf("%c", 'a' - 32);?






What is the purpose of the 'strcmp' function in C?






What is the role of the 'auto' keyword in C?






How do you declare a dynamic array in C?






What is the output of printf("%d", 10 % 3);?






How do you define a multi-line macro in C?






How do you declare a function pointer in C?






What is the purpose of the 'getch' function in C?






Which of the following is not a bitwise operator in C?






What is the output of printf("%d", 1 == 1 ? 10 : 20);?