Java Community | Help. Code. Learn.JC|HCL
Java Community | Help. Code. Learn.โ€ข3y agoโ€ข
24 replies
eat1.

List interface

Guys i am so confused please help me, for example List<String> stringList = List.of("Apple", "Banana", "Orange"); this stringList is holding object references of string objects we cant use add remove methods because it need implementation of that interface. but why we can use .get(1) ? if get is interface method ?
Was this page helpful?