What is the difference between Type List and type ArrayList in Java

0 votes
Typelist v/s ArrayList. If anybody can help?
Jul 9, 2018 in Java by Daisy
• 8,040 points
30 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
Always TypeList is preferred over ArrayList. The first has the advantage that the implementation of the List can change without affecting the rest of the code. This will be a difficult task to do with an ArrayList, not only because you will need to change ArrayList to LinkedList everywhere, but also because you may have used ArrayList specific methods.
answered Jul 9, 2018 by Akrati
• 960 points

Related Questions In Java

0 votes
1 answer

What is the difference between Set and List in java?

List is an ordered sequence of elements. ...READ MORE

answered Apr 26, 2018 in Java by Akrati
• 3,150 points
32 views
0 votes
1 answer

What is the difference between getAttribute() and getParameter() in java?

getParameter() - getParameter will return the value of ...READ MORE

answered Jun 29, 2018 in Java by Perry
• 16,450 points
285 views
0 votes
1 answer

What is the difference between getPath(), getAbsolutePath() and getCanonicalPath() in Java?

getPath() - returns a String which denotes the ...READ MORE

answered Jul 25, 2018 in Java by Mrunal
• 680 points
114 views
0 votes
1 answer

What is the difference between Map and HashMap in java?

Hi Sanhati, I understand your doubt regarding map ...READ MORE

answered May 31 in Java by Sampriti
• 620 points
27 views
0 votes
1 answer

Which is faster amongst an Array and an ArrayList?

Array Over List: The capacity of an Array is fixed.  Whereas ArrayList can ...READ MORE

answered Jul 20, 2018 in Java by sophia
• 1,400 points
28 views
+5 votes
3 answers

How to execute a python file with few arguments in java?

You can use Java Runtime.exec() to run python script, ...READ MORE

answered Mar 27, 2018 in Java by DragonLord999
• 8,360 points

edited Nov 6, 2018 by Omkar 5,298 views
0 votes
1 answer

How to handle drop downs using Selenium WebDriver in Java

First, find an XPath which will return ...READ MORE

answered Mar 27, 2018 in Selenium by nsv999
• 5,050 points
1,405 views
0 votes
1 answer

What are the differences between getText() and getAttribute() functions in Selenium WebDriver?

See, both are used to retrieve something ...READ MORE

answered Apr 5, 2018 in Selenium by nsv999
• 5,050 points
3,856 views
0 votes
1 answer

What is the use of StringBuilder in java?

If you use String concatenation in a ...READ MORE

answered Jun 19, 2018 in Java by Akrati
• 960 points
53 views
0 votes
1 answer

What does NaN mean in Java?

"NaN" stands for "not a number". "Nan" ...READ MORE

answered Jul 12, 2018 in Java by Akrati
• 960 points
66 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.