Use of static keyword

  • Vaskaran Sarcar


Look at the output carefully. Look at the order of the output. You can see the statements in the static block printed on the top of output. Even before the execution of the static block, the static variables were initialized. Later static block changed the values (which are reflected clearly when we call the static method).


Static Method Static Member Static Class Static Block Child Class 

Copyright information

© Vaskaran Sarcar 2016

Authors and Affiliations

  • Vaskaran Sarcar
    • 1
  1. 1.BangaloreIndia

Personalised recommendations