Home > Back-end >  Introduction to Java Arraylist
Introduction to Java Arraylist

Time:10-07

Create the three arraylist now only new first
I had written stuList list=new stuList
But complains but if written Arraylist
It is how to identify which one arraylist
Should be how to modify the

CodePudding user response:

StuList has been set for the new again, you are the three collections, actually let Student object, there is no essential difference, is just like three baskets, are defined, you put the egg, so there is no essential difference between,

CodePudding user response:

reference 1st floor xueshengxiaoming response:
stuList is the collection, can no longer new, the three collections, you actually put Student object, there is no essential difference, is just like three baskets, are defined, you put the eggs, and so there is no essential difference between

But if it is not new to
I said in the set it will be an error types do not match
  • Related