fbpx

What is the purpose of the "static" keyword in Java? Provide an example.

The "static" keyword in Java is used to declare a member (field or method) that belongs to the class itself, rather than to individual instances (objects) of the class. It allows access without creating an object. For example, a static method can be called using the class name directly: ClassName.methodName();

# Dream job to realty