Which of the following does not correctlydeclare an ArrayList?
- ArrayList‹list› = new ArrayList(10);
- ArrayList‹Double› list = new ArrayList‹Double›();
- ArrayList‹Double› list = new ArrayList‹Double›(10);
A. Statement I only
B. Statement II only
C. Statement III only
D. Statements I and II only
E. Statements II and III only
Answer
Answer A:
We need to specify the class name in both sides but in statement1 we did’t specify the properly at 2 sides and we did’t specify anyreference variable in statement 1
Note : If you like my answer please rate and help me it is veryImp for me