Read this to ace every interview question regarding interfaces.

Photo by Killian Cartignies on Unsplash

What are interfaces?

An interface is a reference type similar to a class but different in a sense that it can only contain abstract methods, default methods, static methods, (only default and static methods in interfaces can have a method body)…

Photo by Robert Katzki on Unsplash

Packages in Java correspond with the directory structure in your project. They are used to group and control accessibility of related classes, interfaces and sub-packages.

The advantages of using packages are:

Anton Suprun

Computer Science Student, Programming Enthusiast

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store