Weird function call in java addData( a, b {some crap})
<p>I encountered a weird function call which is shown below:</p>

<pre><code>addData("abc", "abc" {
        public boolean isDataCorrect() {
          return true;
        }
      });
</code></pre>

<p>addData signature is </p>

<pre><code>public void addData(String a, String b);
</code></pre>

<p>Can anyone explain whats the code in curly braces doing? Moreover how is it even working?</p>
