It is used to create another block before the main class. every java codes runs here first. Any code gets executed before the main class static{ //code is placed between these brackets. }