List Interface

  • Eclipse: Oxygen
  • Java: 1.8

The concept of Interface is not new to us. The interface is an outline of the methods for a particular class to implement. Here the ArrayList, LinkedList implement the list hence can use the methods which are defined in the List interface as shown here.

Output

Element: India
Element: USA
Element: Poland
Element: Egypt
Element: Thailand
Element: Russia
*****************************
Element: One
Element: Two
Element: Three
Element: Four
Element: Five
*****************************

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