ArrayList

  • Eclipse: Oxygen
  • Java: 1.8

Here all the basic operation associated with the Arraylists are shown such as the append the name to the ArrayList, remove by position, remove by the string ( case sensitive) and also get the position of the element given. Further, the ArrayList will be studied in detail.

Output

Chaand
John
Steve
Pooja
Salim
Rahul
Mia
Angel
************
Chaand
John
Steve
Salim
Rahul
Mia
Angel
************
Salim

ArrayList is one of the most widely used Collection class.

ArrayList Part 2

ArrayList in Java is used to store a collection of dynamic-sized elements. Unlike arrays that have a fixed size, an ArrayList automatically increases its size when new elements are added.

The further implementation of search by position using indexOf() function and also modify entity with the help of function is shown here.

Output

Chaand
John
Steve
Pooja
Salim
Rahul
Mia
Angel
************
Chaand
John
Steve
Emma
Salim
Rahul
Mia
Angel

Contributed by Poonam Tomar

 


VIEW COURSES

Buy me a coffee!

 

PayTM QR (INDIA)

  • Get video tutorials
  • Project files set
  • Get¬†Certified

Leave a Reply

avatar
  Subscribe  
Notify of
Close Menu