The interface is used to define API. It tells about the contract your classes will follow. It also supports abstraction because a client can use interface method to leverage multiple implementations e.g. by using List interface you can take advantage of random access of ArrayList as well as flexible insertion and deletion of LinkedList. The interface doesn't allow you to write code to keep things abstract but from Java 8 you can declare static and default methods inside interface which are concrete.
Data Visualisation Aurora
Hadoop and Big Data
Agile and SAFE
New York, NY 10012, US
© Copyright 2018-2023 www.madanswer.com. All rights reserved. Developed by Madanswer.