Ask Question

Which of the following correctly declares an ArrayList?

a. ArrayList‹ double› aList = new ArrayList‹ double› (10);

b. ArrayList‹ Double› aList = new ArrayList‹ Double› ();

c. ArrayList‹ Double› aList = new ArrayList‹ Double› (10);

+1
Answers (1)
  1. 23 January, 12:08
    0
    ArrayList‹ double› aList = new ArrayList‹ double› (10); correctly declares an ArrayList

    a. ArrayList‹ double› aList = new ArrayList‹ double› (10);

    Explanation:

    In programming language to store more value of same data type single or double dimensional array.

    For example if end user is store 25 value of same data type, he or she can't defined 25 variable and access is very hard in the programming languages.

    To avoid these of type situation end user use single or double dimensional array where can store 25 values.

    Singled dimensions each cell access by cell no,

    Double dimension each cell access by row no, cell no

    In above scenario it is defined as single dimensional array with 10 cells and data type is double.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Which of the following correctly declares an ArrayList? a. ArrayList‹ double› aList = new ArrayList‹ double› ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers