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,050 points
60 views

1 answer to this question.

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
2 answers

What is the difference between Set and List in java?

LIST SET Duplicates YES NO Order Ordered Depends on Implementation Positional Access YES NO List is an ordered sequence ...READ MORE

answered Aug 14 in Java by Sirajul
• 19,670 points
86 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
• 17,010 points
480 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
182 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
• 1,100 points
90 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
67 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,380 points

edited Nov 6, 2018 by Omkar 7,275 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,070 points
1,831 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,070 points
4,785 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
68 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
96 views