Weird function call in java addData( a, b {some crap})
I encountered a weird function call which is explained below

    addData("abc", "abc" {
            public boolean isDataCorrect() {
              return true;
            }
          });

addData signature is 

    public void addData(String a, String b);

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

Weird function call in java addData( a, b {some crap})
===

I encountered a weird function call which is explained below

    addData("abc", "abc" {
            public boolean isDataCorrect() {
              return true;
            }
          });

addData signature is 

    public void addData(String a, String b);

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