title: what is "static{}" in Java?
body: <p>I'm not a pro in OOP so please bear with me.</p>
  
  <p>This piece of code is from android's auto generate <strong>Master/Detail Flow</strong> project :</p>
  
  <pre><code>static {
          // Add 3 sample items.
          addItem(new DummyItem("1", "Item 1"));
          addItem(new DummyItem("2", "Item 2"));
          addItem(new DummyItem("3", "Item 3"));
      }
  </code></pre>
  
  <p>What is that? I mean is it a method?a constructor?or what?</p>