Photo by Jacek Dylag on Unsplash

Exceptions in Java are events that occur when there is disruption to the normal flow of the program and the null pointer exception is one of these events. The NullPointerException occurs when a reference variable should point to an object but instead it points to null. …

Photo by Jonathon Young on Unsplash

Access modifiers in Java are keywords that are used to specify the accessibility of fields, methods, constructors and classes. There are four access modifiers, each specifying a certain level of accessibility:

  1. public: can be accessed from anywhere

2. protected: can be accessed from within the class itself, the package and…

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:

  • Better access control: Packages equip the developer with better access control.
  • Avoid name conflicts: Using packages prevents you from…

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