Static Methods in Java
Static methods in Java work on the same basic idea of static functions in other languages like C/C++. The idea is that sometimes you have a function that either needs to be shared between instances, instead of tied to a specific instance, or to be used without needing to create an object from the class…