Static and Non static block in Java | Core Java Tutorials

This Core Java Tutorials “Static and Instance block in Java” post explains clearly what is the definition of block, need to block and difference between static block and non static block in java application.


 

Block:

  • Set of Instructions.
  • Block doesn’t have no identity.
  • We cannot call explicitly (because of no identity).
  • JVM access every block in java application automatically.
  • Block providing basic information to start communication with object.\
  • General blocks such as while, for, if… used to define logical programming.
  • These blocks also cannot be called explicitly in the program.

Share this