The static keyword in Java is used to declare a variable, method, or nested class as belonging to the class itself, rather than to an instance of the class. Static members are shared among all instances of a class and can be accessed without creating an object of that class.