static block in java

Author Topic: static block in java  (Read 1932 times)

Offline mk12345Topic starter

  • Trade Count: (0)
  • Newbie
  • *
  • Thank You 0
  • Posts: 1
  • Karma: 0
static block in java
« on: 11-09-2013, 01:22:09 »
what is static synchronization in java language.


Offline MarcoLeitner

  • Trade Count: (0)
  • Semi-Newbie
  • *
  • Thank You 5
  • Posts: 33
  • Karma: 0
  • Gender: Male
    • http://www.techiring.com
Re: static block in java
« Reply #1 on: 06-04-2015, 11:32:55 »
java support a special block called Static block which can be used for static initialization of a class. What ever code we write in a static block can be executed only once. Static block is also called a static initialization block.Its a normal block of code  enclosed in a {} and preceded by a static keyword.a class can also have any number of static initialization block.

 

Related Topics

  Subject / Started by Replies Last post
4 Replies
2083 Views
Last post 06-01-2010, 02:58:58
by coolrays
0 Replies
926 Views
Last post 09-10-2011, 10:24:40
by Maddy
2 Replies
1485 Views
Last post 10-17-2011, 03:41:36
by Hogward
3 Replies
3881 Views
Last post 08-19-2015, 01:48:54
by SanviMalhotra
0 Replies
1247 Views
Last post 02-02-2015, 06:03:58
by AvniShergill