Solved

Consider the Following Code Snippet: ArrayList<BankAccount> Accounts1 = New ArrayList<BankAccount>();

Question 67

Multiple Choice

Consider the following code snippet: ArrayList<BankAccount> accounts1 = new ArrayList<BankAccount>() ; //Line 1
LinkedList accounts2 = new LinkedList() ; //Line 2
Accounts1.add("my Salary") ; //Line 3
Accounts2.addFirst("my Salary") ; //Line 4
Which of the above lines will cause a compile-time error?


A) Line 1
B) Line 2
C) Line 3
D) Line 4

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions