0

I'm a beginner.i can't understand the difference between "ArrayList list=new ArrayList();" and " List list=new ArrayList();".please help me.Thank you very much!

Mr.Chen
  • 1
  • 1

1 Answers1

0

List and ArrayList are the members of the Collection framework. List is a collection of elements in a sequence where each element is an object and elements are accessed by there position (index). The primary difference between List and ArrayList is that List is an interface and ArrayList is a class

Kanwarpreet Singh
  • 2,037
  • 1
  • 13
  • 28